From 7892a3879589cb7c9aed6409baed1dc6504f273a Mon Sep 17 00:00:00 2001 From: Paul Blacknell Date: Mon, 26 Jun 2023 20:56:07 +0100 Subject: [PATCH] add HybridControllerPhase to json payload (#18842) --- tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino b/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino index 95041ca47..f8bed9bd4 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino @@ -2048,6 +2048,7 @@ const char HTTP_THERMOSTAT_HL[] PROGMEM = "{s}
{m}
{e}"; #endif // USE_WEBSERVER #define D_THERMOSTAT_JSON_NAME_CONTROL_METHOD "ControlMethod" +#define D_THERMOSTAT_JSON_NAME_HYBRID_CONTROLLER_PHASE "HybridControllerPhase" #define D_THERMOSTAT_JSON_NAME_EMERGENCY_STATE "EmergencyState" void ThermostatShow(uint8_t ctr_output, bool json) @@ -2058,7 +2059,8 @@ void ThermostatShow(uint8_t ctr_output, bool json) ResponseAppend_P(PSTR("%s\"%s\":%i"), "", D_CMND_THERMOSTATMODESET, Thermostat[ctr_output].status.thermostat_mode); ResponseAppend_P(PSTR("%s\"%s\":%2_f"), ",", D_CMND_TEMPTARGETSET, &f_target_temp); ResponseAppend_P(PSTR("%s\"%s\":%i"), ",", D_CMND_CTRDUTYCYCLEREAD, ThermostatGetDutyCycle(ctr_output)); - ResponseAppend_P(PSTR("%s\"%s\":%i"), ",", D_THERMOSTAT_JSON_NAME_CONTROL_METHOD, Thermostat[ctr_output].status.controller_mode == CTR_HYBRID ? Thermostat[ctr_output].status.phase_hybrid_ctr : Thermostat[ctr_output].status.controller_mode); + ResponseAppend_P(PSTR("%s\"%s\":%i"), ",", D_THERMOSTAT_JSON_NAME_CONTROL_METHOD, Thermostat[ctr_output].status.controller_mode); + ResponseAppend_P(PSTR("%s\"%s\":%i"), ",", D_THERMOSTAT_JSON_NAME_HYBRID_CONTROLLER_PHASE, Thermostat[ctr_output].status.phase_hybrid_ctr); ResponseAppend_P(PSTR("%s\"%s\":%i"), ",", D_THERMOSTAT_JSON_NAME_EMERGENCY_STATE, Thermostat[ctr_output].diag.state_emergency == EMERGENCY_ON); ResponseJsonEnd(); return;