From c344c43185a947b5085426b3d0dfcf3acf56fbf2 Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Sat, 12 Oct 2024 11:02:24 +0200 Subject: [PATCH] FIX #518 (#543) Co-authored-by: Jean-Marc Collin --- custom_components/versatile_thermostat/underlyings.py | 2 ++ tests/test_bugs.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/custom_components/versatile_thermostat/underlyings.py b/custom_components/versatile_thermostat/underlyings.py index 2d92669..ae1dda8 100644 --- a/custom_components/versatile_thermostat/underlyings.py +++ b/custom_components/versatile_thermostat/underlyings.py @@ -622,6 +622,8 @@ class UnderlyingClimate(UnderlyingEntity): ATTR_ENTITY_ID: self._entity_id, "target_temp_high": target_temp, "target_temp_low": target_temp, + # issue 518 - we should send also the target temperature, even in TARGET RANGE + "temperature": target_temp, } else: data = { diff --git a/tests/test_bugs.py b/tests/test_bugs.py index 74c2020..fdc1995 100644 --- a/tests/test_bugs.py +++ b/tests/test_bugs.py @@ -1001,6 +1001,7 @@ async def test_bug_508( # "temperature": 17.5, "target_temp_high": 10, "target_temp_low": 10, + "temperature": 10, }, ), ] @@ -1021,6 +1022,7 @@ async def test_bug_508( "entity_id": "climate.mock_climate", "target_temp_high": 31, "target_temp_low": 31, + "temperature": 31, }, ), ]