Skip to content

Commit 5a7414d

Browse files
Merge pull request #10 from danielsmith-eu/bugfix/time_minutes_deprecated
Update sensor.py
2 parents bb18cb1 + e017a48 commit 5a7414d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/themeparks/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
SensorStateClass,
1111
)
1212
from homeassistant.config_entries import ConfigEntry
13-
from homeassistant.const import TIME_MINUTES
13+
from homeassistant.const import UnitOfTime
1414
from homeassistant.core import HomeAssistant, callback
1515
from homeassistant.helpers.entity_platform import AddEntitiesCallback
1616
from homeassistant.helpers.update_coordinator import (
@@ -52,7 +52,7 @@ def __init__(self, coordinator, idx):
5252
super().__init__(coordinator)
5353
self.idx = idx
5454
self._attr_name = coordinator.data[idx][NAME]
55-
self._attr_native_unit_of_measurement = TIME_MINUTES
55+
self._attr_native_unit_of_measurement = UnitOfTime.TIME_MINUTES
5656
self._attr_device_class = SensorDeviceClass.DURATION
5757
self._attr_state_class = SensorStateClass.MEASUREMENT
5858
self._attr_native_value = self.coordinator.data[self.idx][TIME]

0 commit comments

Comments
 (0)