mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 21:26:33 +00:00
Merge pull request #7127 from ascillato/patch-1
Reverting changes in tele message due to compatibility
This commit is contained in:
commit
f4993736a5
@ -565,7 +565,7 @@ void MqttShowState(void)
|
||||
if (i == LightDevice()) { LightState(1); } // call it only once
|
||||
} else {
|
||||
#endif
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"STATE\":\"%s\"}"), GetPowerDevice(stemp1, i, sizeof(stemp1), Settings.flag.device_index_enable), // SetOption26 - Switch between POWER or POWER1
|
||||
ResponseAppend_P(PSTR(",\"%s\":\"%s\""), GetPowerDevice(stemp1, i, sizeof(stemp1), Settings.flag.device_index_enable), // SetOption26 - Switch between POWER or POWER1
|
||||
GetStateText(bitRead(power, i-1)));
|
||||
#ifdef USE_SONOFF_IFAN
|
||||
if (IsModuleIfan()) {
|
||||
@ -609,7 +609,7 @@ bool MqttShowSensor(void)
|
||||
if (pin[GPIO_SWT1 +i] < 99) {
|
||||
#endif // USE_TM1638
|
||||
bool swm = ((FOLLOW_INV == Settings.switchmode[i]) || (PUSHBUTTON_INV == Settings.switchmode[i]) || (PUSHBUTTONHOLD_INV == Settings.switchmode[i]));
|
||||
ResponseAppend_P(PSTR(",\"" D_JSON_SWITCH "%d\":{\"STATE\":\"%s\"}"), i +1, GetStateText(swm ^ SwitchLastState(i)));
|
||||
ResponseAppend_P(PSTR(",\"" D_JSON_SWITCH "%d\":\"%s\""), i +1, GetStateText(swm ^ SwitchLastState(i)));
|
||||
}
|
||||
}
|
||||
XsnsCall(FUNC_JSON_APPEND);
|
||||
|
Loading…
x
Reference in New Issue
Block a user