mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-07 01:47:43 +00:00
Merge pull request #6548 from effelle/development
Home Assistant integration BTN/SW
This commit is contained in:
commit
b4cac5c038
@ -347,7 +347,7 @@ void HAssAnnounceSwitches(void)
|
||||
// Send info about buttons
|
||||
char *tmp = Settings.switch_topic;
|
||||
Format(sw_topic, tmp, sizeof(sw_topic));
|
||||
if ((strlen(sw_topic) != 0) && strcmp(sw_topic, "0")) {
|
||||
if (strlen(sw_topic) != 0) {
|
||||
for (uint32_t switch_index = 0; switch_index < MAX_SWITCHES; switch_index++) {
|
||||
uint8_t switch_present = 0;
|
||||
uint8_t toggle = 1;
|
||||
@ -376,7 +376,7 @@ void HAssAnnounceButtons(void)
|
||||
// Send info about buttons
|
||||
char *tmp = Settings.button_topic;
|
||||
Format(key_topic, tmp, sizeof(key_topic));
|
||||
if ((strlen(key_topic) != 0) && strcmp(key_topic, "0")) {
|
||||
if (strlen(key_topic) != 0) {
|
||||
for (uint32_t button_index = 0; button_index < MAX_KEYS; button_index++) {
|
||||
uint8_t button_present = 0;
|
||||
uint8_t toggle = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user