From b032198c66b501fd44b3a616140d2280d3427059 Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Sat, 7 Oct 2023 18:16:20 +0200 Subject: [PATCH] Issue #103 - expose preset temp pour AC mode --- custom_components/versatile_thermostat/climate.py | 4 ++-- custom_components/versatile_thermostat/services.yaml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_components/versatile_thermostat/climate.py b/custom_components/versatile_thermostat/climate.py index 7e16569..4d11da7 100644 --- a/custom_components/versatile_thermostat/climate.py +++ b/custom_components/versatile_thermostat/climate.py @@ -183,7 +183,7 @@ async def async_setup_entry( platform.async_register_entity_service( SERVICE_SET_PRESET_TEMPERATURE, { - vol.Required("preset"): vol.In(CONF_PRESETS), + vol.Required("preset"): vol.In(CONF_PRESETS_WITH_AC), vol.Optional("temperature"): vol.Coerce(float), vol.Optional("temperature_away"): vol.Coerce(float), }, @@ -2429,8 +2429,8 @@ async def service_set_preset_temperature( """Called by a service call: service: versatile_thermostat.set_preset_temperature data: - temperature: 17.8 preset: boost + temperature: 17.8 temperature_away: 15 target: entity_id: climate.thermostat_2 diff --git a/custom_components/versatile_thermostat/services.yaml b/custom_components/versatile_thermostat/services.yaml index 5bc06d1..b32536b 100644 --- a/custom_components/versatile_thermostat/services.yaml +++ b/custom_components/versatile_thermostat/services.yaml @@ -43,6 +43,9 @@ set_preset_temperature: - "eco" - "comfort" - "boost" + - "eco_ac" + - "comfort_ac" + - "boost_ac" temperature: name: Temperature when present description: Target temperature for the preset when present