From ba184624aa39d45f700f9a834c8b957c2a6ae1ab Mon Sep 17 00:00:00 2001 From: Emory Penney Date: Wed, 17 Apr 2024 14:52:26 -0700 Subject: [PATCH] Update sensor.py --- custom_components/nest_protect/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/nest_protect/sensor.py b/custom_components/nest_protect/sensor.py index 37217ef..d10f097 100644 --- a/custom_components/nest_protect/sensor.py +++ b/custom_components/nest_protect/sensor.py @@ -11,7 +11,7 @@ SensorEntity, SensorEntityDescription, ) -from homeassistant.const import PERCENTAGE, TEMP_CELSIUS +from homeassistant.const import PERCENTAGE, UnitOfTemperature from homeassistant.helpers.entity import EntityCategory from homeassistant.helpers.typing import StateType @@ -48,7 +48,7 @@ class NestProtectSensorDescription(SensorEntityDescription): key="current_temperature", value_fn=lambda state: round(state, 2), device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=TEMP_CELSIUS, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, ), # TODO Add Color Status (gray, green, yellow, red) # TODO Smoke Status (OK, Warning, Emergency)