From 3e2a6874dbb011da506fe54211edfede5ad2b692 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Tue, 29 Oct 2024 09:28:54 +0000 Subject: [PATCH] Typing --- custom_components/hive_local_thermostat/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/hive_local_thermostat/sensor.py b/custom_components/hive_local_thermostat/sensor.py index bd5278a..e7319cf 100644 --- a/custom_components/hive_local_thermostat/sensor.py +++ b/custom_components/hive_local_thermostat/sensor.py @@ -193,8 +193,8 @@ def process_update(self, mqtt_data) -> None: if self.entity_description.device_class == SensorDeviceClass.TEMPERATURE: new_value = show_temp( self.hass, - new_value, - self.entity_description.native_unit_of_measurement, + cast(float, new_value), + self.entity_description.native_unit_of_measurement or UnitOfTemperature.CELSIUS, PRECISION_TENTHS, )