mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-10 03:17:42 +00:00
Update xdrv_12_home_assistant.ino
This commit is contained in:
parent
bc55237154
commit
4eef80e4d9
@ -347,7 +347,7 @@ void HAssAnnounceSwitches(void)
|
|||||||
// Send info about buttons
|
// Send info about buttons
|
||||||
char *tmp = Settings.switch_topic;
|
char *tmp = Settings.switch_topic;
|
||||||
Format(sw_topic, tmp, sizeof(sw_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++) {
|
for (uint32_t switch_index = 0; switch_index < MAX_SWITCHES; switch_index++) {
|
||||||
uint8_t switch_present = 0;
|
uint8_t switch_present = 0;
|
||||||
uint8_t toggle = 1;
|
uint8_t toggle = 1;
|
||||||
@ -376,7 +376,7 @@ void HAssAnnounceButtons(void)
|
|||||||
// Send info about buttons
|
// Send info about buttons
|
||||||
char *tmp = Settings.button_topic;
|
char *tmp = Settings.button_topic;
|
||||||
Format(key_topic, tmp, sizeof(key_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++) {
|
for (uint32_t button_index = 0; button_index < MAX_KEYS; button_index++) {
|
||||||
uint8_t button_present = 0;
|
uint8_t button_present = 0;
|
||||||
uint8_t toggle = 1;
|
uint8_t toggle = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user