diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b105cb49..0ecf8d062 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Support for GUI tooltip on touch media like phones and tablets - ESP32 MiEL HVAC Modbus RTU slave on a second RS485 port exposing all states and functions for PLC use with `#define USE_MIEL_HVAC_MODBUS_SLAVE` (#24982) +- MiEL HVAC climate control panel on the web UI main page (mode, target temperature, fan, vanes, air direction) with live state (xdrv_44) - Support for TFA Dostmann Marbella 868MHz pool thermometer using a CC1101 (#24959) ### Breaking Changed diff --git a/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino b/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino index 3c47193e4..ce9cafc95 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino @@ -3566,31 +3566,640 @@ miel_hvac_sensor(struct miel_hvac_softc *sc) #ifdef USE_WEBSERVER /* - * Web UI sensor display — shows instantaneous Power (W) and cumulative - * Total energy (kWh) rows on the Tasmota main page, matching how other - * energy drivers render their values. + * Current mode as a control-panel keyword ("off" when powered down; i-See + * mode variants folded onto their base mode). + */ +static const char * +miel_hvac_web_curmode(const struct miel_hvac_data_settings *set) +{ + if (!set->power) + return ("off"); + + switch (set->mode & MIEL_HVAC_SETTINGS_MODE_MASK) + { + case MIEL_HVAC_SETTINGS_MODE_HEAT: + case MIEL_HVAC_SETTINGS_MODE_HEAT_ISEE: + return ("heat"); + case MIEL_HVAC_SETTINGS_MODE_COOL: + case MIEL_HVAC_SETTINGS_MODE_COOL_ISEE: + return ("cool"); + case MIEL_HVAC_SETTINGS_MODE_DRY: + case MIEL_HVAC_SETTINGS_MODE_DRY_ISEE: + return ("dry"); + case MIEL_HVAC_SETTINGS_MODE_FAN: + return ("fan"); + case MIEL_HVAC_SETTINGS_MODE_AUTO: + return ("auto"); + } + return (""); +} + +/* Apply the locale decimal separator to a plain number string in place. */ +static void +miel_hvac_dsep(char *s) +{ + if (D_DECIMAL_SEPARATOR[0] == '.') + return; + for (; *s != '\0'; s++) + { + if (*s == '.') + *s = D_DECIMAL_SEPARATOR[0]; + } +} + +/* + * Emit one state row. js=false renders the initial