mirror of
https://github.com/arendst/Tasmota.git
synced 2026-10-26 22:11:22 +00:00
Shutter: fix ShutterButton MQTT flag parameters on ESP32 (#25116)
The MQTT flags m1, m2, m3 and mh were stored one slot too high (position[i-6]), so mh set the triple press flag and m1 wrote before the start of the position array. mi (mqtt_all) could not be set at all. Store m1..mh in position[0..3], set mqtt_all from mi and include it in the command response, as the ESP8266 driver already does. Fixes #25082
This commit is contained in:
1 parent
bffbbeca17
commit
b8eb9a5788
1 file changed
+5
-1
@@ -1558,9 +1558,12 @@ void CmndShutterButton(void)
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
if (field==1)
|
||||
setting.position[i-5].mqtt_broadcast = true;
|
||||
break;
|
||||
case 9:
|
||||
if (field==1)
|
||||
setting.position[i-6].mqtt_broadcast = true;
|
||||
setting.mqtt_all = true;
|
||||
break;
|
||||
}
|
||||
if (isShortCommand) {
|
||||
@@ -1647,6 +1650,7 @@ void CmndShutterButton(void)
|
||||
else
|
||||
setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR(" -"));
|
||||
}
|
||||
setting_chr_ptr += sprintf_P(setting_chr_ptr, setting.mqtt_all ? PSTR(" 1") : PSTR(" -"));
|
||||
}
|
||||
}
|
||||
ShutterSettingsSave();
|
||||
|
||||
Reference in new issue
Block a user