mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Merge pull request #7088 from ascillato/patch-1
Add a new rule trigger: tele-switch1#state
This commit is contained in:
commit
744969d1fb
@ -609,7 +609,7 @@ bool MqttShowSensor(void)
|
|||||||
if (pin[GPIO_SWT1 +i] < 99) {
|
if (pin[GPIO_SWT1 +i] < 99) {
|
||||||
#endif // USE_TM1638
|
#endif // USE_TM1638
|
||||||
bool swm = ((FOLLOW_INV == Settings.switchmode[i]) || (PUSHBUTTON_INV == Settings.switchmode[i]) || (PUSHBUTTONHOLD_INV == Settings.switchmode[i]));
|
bool swm = ((FOLLOW_INV == Settings.switchmode[i]) || (PUSHBUTTON_INV == Settings.switchmode[i]) || (PUSHBUTTONHOLD_INV == Settings.switchmode[i]));
|
||||||
ResponseAppend_P(PSTR(",\"" D_JSON_SWITCH "%d\":\"%s\""), i +1, GetStateText(swm ^ SwitchLastState(i)));
|
ResponseAppend_P(PSTR(",\"" D_JSON_SWITCH "%d\":{\"STATE\":\"%s\"}"), i +1, GetStateText(swm ^ SwitchLastState(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
XsnsCall(FUNC_JSON_APPEND);
|
XsnsCall(FUNC_JSON_APPEND);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user