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, )