Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ejpenney authored Apr 17, 2024
1 parent 812f51a commit ba18462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/nest_protect/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ba18462

Please sign in to comment.