From e11fb453119ca02c393e2ad6f9575c5e610b97d3 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Wed, 10 Apr 2024 12:13:02 +0100 Subject: [PATCH] Add native unit temperatures --- custom_components/hive_local_thermostat/number.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_components/hive_local_thermostat/number.py b/custom_components/hive_local_thermostat/number.py index 78e00fb..75438fa 100644 --- a/custom_components/hive_local_thermostat/number.py +++ b/custom_components/hive_local_thermostat/number.py @@ -19,6 +19,7 @@ Platform, STATE_UNAVAILABLE, STATE_UNKNOWN, + UnitOfTemperature, ) from .entity import HiveEntity, HiveEntityDescription @@ -77,6 +78,7 @@ async def async_setup_entry( topic=None, entity_category=EntityCategory.CONFIG, device_class=NumberDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_min_value=5, native_max_value=16, native_step=0.5, @@ -92,6 +94,7 @@ async def async_setup_entry( topic=None, entity_category=EntityCategory.CONFIG, device_class=NumberDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_min_value=16, native_max_value=22, native_step=0.5, @@ -107,6 +110,7 @@ async def async_setup_entry( topic=None, entity_category=EntityCategory.CONFIG, device_class=NumberDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_min_value=12, native_max_value=32, native_step=0.5,