mirror of https://github.com/arendst/Tasmota.git
Add rule trigger tele-switch1#state
This commit is contained in:
parent
b41912a136
commit
4441f212d5
|
@ -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…
Reference in New Issue