mirror of https://github.com/arendst/Tasmota.git
Check no hold retain flag on hold action sending
This commit is contained in:
parent
b3adab4097
commit
6cbfb0308a
|
@ -1434,10 +1434,10 @@ bool SendKey(uint8_t key, uint8_t device, uint8_t state)
|
|||
}
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (!(DomoticzSendKey(key, device, state, strlen(mqtt_data)))) {
|
||||
MqttPublishDirect(stopic, (key) ? Settings.flag.mqtt_switch_retain : Settings.flag.mqtt_button_retain);
|
||||
MqttPublishDirect(stopic, ((key) ? Settings.flag.mqtt_switch_retain : Settings.flag.mqtt_button_retain) && (state != 3 || !Settings.flag3.no_hold_retain));
|
||||
}
|
||||
#else
|
||||
MqttPublishDirect(stopic, (key) ? Settings.flag.mqtt_switch_retain : Settings.flag.mqtt_button_retain);
|
||||
MqttPublishDirect(stopic, ((key) ? Settings.flag.mqtt_switch_retain : Settings.flag.mqtt_button_retain) && (state != 3 || !Settings.flag3.no_hold_retain));
|
||||
#endif // USE_DOMOTICZ
|
||||
result = !Settings.flag3.button_switch_force_local;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue