mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 21:26:33 +00:00
Fix shutters discovery
This commit is contained in:
parent
0cb31f72dd
commit
219a254c84
@ -298,6 +298,7 @@ void NewHAssDiscovery(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stemp3[0] = '\0';
|
stemp3[0] = '\0';
|
||||||
|
stemp4[0] = '\0';
|
||||||
// Enable Discovery for Switches only if SetOption114 is enabled
|
// Enable Discovery for Switches only if SetOption114 is enabled
|
||||||
for (uint32_t i = 0; i < MAX_SWITCHES; i++) {
|
for (uint32_t i = 0; i < MAX_SWITCHES; i++) {
|
||||||
char sname[TOPSZ];
|
char sname[TOPSZ];
|
||||||
@ -315,12 +316,13 @@ void NewHAssDiscovery(void)
|
|||||||
snprintf_P(stemp5, sizeof(stemp5), PSTR("%s%s%d"), stemp5, (i > 0 ? "," : ""), (SerialButton ? 1 : (PinUsed(GPIO_KEY1, i)) & Settings.flag3.mqtt_buttons));
|
snprintf_P(stemp5, sizeof(stemp5), PSTR("%s%s%d"), stemp5, (i > 0 ? "," : ""), (SerialButton ? 1 : (PinUsed(GPIO_KEY1, i)) & Settings.flag3.mqtt_buttons));
|
||||||
SerialButton = false;
|
SerialButton = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_SHUTTER
|
|
||||||
stemp6[0] = '\0';
|
stemp6[0] = '\0';
|
||||||
|
#ifdef USE_SHUTTER
|
||||||
for (uint32_t i = 0; i < MAX_SHUTTERS; i++) {
|
for (uint32_t i = 0; i < MAX_SHUTTERS; i++) {
|
||||||
snprintf_P(stemp6, sizeof(stemp6), PSTR("%s%s%d"), stemp6, (i > 0 ? "," : ""), Settings.shutter_options[i]);
|
snprintf_P(stemp6, sizeof(stemp6), PSTR("%s%s%d"), stemp6, (i > 0 ? "," : ""), Settings.shutter_options[i]);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
snprintf_P(stemp6, sizeof(stemp6), PSTR("0,0,0,0"));
|
||||||
#endif // USE_SHUTTER
|
#endif // USE_SHUTTER
|
||||||
|
|
||||||
ResponseClear(); // Clear retained message
|
ResponseClear(); // Clear retained message
|
||||||
|
Loading…
x
Reference in New Issue
Block a user