From 1da7b313d44315382e0e198b1833e2f74eac9f77 Mon Sep 17 00:00:00 2001 From: Andy Barratt Date: Fri, 13 Sep 2024 14:04:02 +0100 Subject: [PATCH] Add discovered HVAC and PRESET options (#1177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add discovered HVAC and PRESET options This commit adds the HVAC Action Set and Preset Set that I've discovered my Bödenwarme Underfloor Heating thermostat to be using as detailed here: https://github.com/rospogrigio/localtuya/issues/1175 * Add HVAC mode and action sets for climate entities These are the actions and modes as reported by the Magnum smart wifi thermostat: https://www.magnumheating.com/product/remote-control/ --------- Co-authored-by: Rutger Kerkhoff --- custom_components/localtuya/climate.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/custom_components/localtuya/climate.py b/custom_components/localtuya/climate.py index da23cfa..55bd303 100644 --- a/custom_components/localtuya/climate.py +++ b/custom_components/localtuya/climate.py @@ -72,6 +72,10 @@ HVAC_MODE_SETS = { HVACMode.HEAT: "Manual", HVACMode.AUTO: "Auto", }, + "MANUAL/AUTO": { + HVAC_MODE_HEAT: "MANUAL", + HVAC_MODE_AUTO: "AUTO", + }, "Manual/Program": { HVACMode.HEAT: "Manual", HVACMode.AUTO: "Program", @@ -112,6 +116,10 @@ HVAC_ACTION_SETS = { HVACAction.HEATING: "Heat", HVACAction.IDLE: "Warming", }, + "heating/warming": { + CURRENT_HVAC_HEAT: "heating", + CURRENT_HVAC_IDLE: "warming", + }, } HVAC_FAN_MODE_SETS = { "Auto/Low/Middle/High/Strong": { @@ -134,6 +142,11 @@ PRESET_SETS = { PRESET_HOME: "Program", PRESET_NONE: "Manual", }, + "smart/holiday/hold": { + PRESET_AWAY: "holiday", + PRESET_HOME: "smart", + PRESET_NONE: "hold", + }, } TEMPERATURE_CELSIUS = "celsius"