From d85866d49cc2a2743cd4e170e063dedbb8d9da6e Mon Sep 17 00:00:00 2001 From: G Johansson Date: Sun, 23 Oct 2022 22:24:55 +0200 Subject: [PATCH] Fix temperature unit in sensor for Sensibo (#80843) --- homeassistant/components/sensibo/sensor.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/sensibo/sensor.py b/homeassistant/components/sensibo/sensor.py index 25d83089a52..22981ada51f 100644 --- a/homeassistant/components/sensibo/sensor.py +++ b/homeassistant/components/sensibo/sensor.py @@ -23,7 +23,6 @@ from homeassistant.const import ( PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, TEMP_CELSIUS, - TEMP_FAHRENHEIT, ) from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import EntityCategory @@ -263,9 +262,7 @@ class SensiboMotionSensor(SensiboMotionBaseEntity, SensorEntity): def native_unit_of_measurement(self) -> str | None: """Add native unit of measurement.""" if self.entity_description.device_class == SensorDeviceClass.TEMPERATURE: - return ( - TEMP_CELSIUS if self.device_data.temp_unit == "C" else TEMP_FAHRENHEIT - ) + return TEMP_CELSIUS return self.entity_description.native_unit_of_measurement @property @@ -299,9 +296,7 @@ class SensiboDeviceSensor(SensiboDeviceBaseEntity, SensorEntity): def native_unit_of_measurement(self) -> str | None: """Add native unit of measurement.""" if self.entity_description.device_class == SensorDeviceClass.TEMPERATURE: - return ( - TEMP_CELSIUS if self.device_data.temp_unit == "C" else TEMP_FAHRENHEIT - ) + return TEMP_CELSIUS return self.entity_description.native_unit_of_measurement @property