Merge pull request #4596 from emontnemery/hass_fix_button_switch2

More tweak of Hass switch/button
This commit is contained in:
Theo Arends 2018-12-11 22:49:47 +01:00 committed by GitHub
commit 160f184e7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -44,10 +44,11 @@ const char HASS_DISCOVER_BUTTON_SWITCH[] PROGMEM =
"\"payload_not_available\":\"" D_OFFLINE "\""; // Offline
const char HASS_DISCOVER_BUTTON_SWITCH_TOGGLE[] PROGMEM =
"%s,\"off_delay\":1";
"%s,\"off_delay\":1"; // Hass has no support for TOGGLE, fake it by resetting to OFF after 1s
const char HASS_DISCOVER_BUTTON_SWITCH_ONOFF[] PROGMEM =
"%s,\"payload_off\":\"%s\""; // OFF
"%s,\"force_update\":true," // In ON/OFF case, enable force_update to make automations work
"\"payload_off\":\"%s\""; // OFF
const char HASS_DISCOVER_LIGHT_DIMMER[] PROGMEM =
"%s,\"brightness_command_topic\":\"%s\"," // cmnd/led2/Dimmer
@ -114,10 +115,11 @@ const char HASS_DISCOVER_BUTTON_SWITCH_SHORT[] PROGMEM =
"\"pl_not_avail\":\"" D_OFFLINE "\""; // Offline
const char HASS_DISCOVER_BUTTON_SWITCH_TOGGLE_SHORT[] PROGMEM =
"%s,\"off_delay\":1";
"%s,\"off_delay\":1"; // Hass has no support for TOGGLE, fake it by resetting to OFF after 1s
const char HASS_DISCOVER_BUTTON_SWITCH_ONOFF_SHORT[] PROGMEM =
"%s,\"pl_off\":\"%s\""; // OFF
"%s,\"frc_upd\":true," // In ON/OFF case, enable force_update to make automations work
"\"pl_off\":\"%s\""; // OFF
const char HASS_DISCOVER_LIGHT_DIMMER_SHORT[] PROGMEM =