Skip to content

Commit f1f98a8

Browse files
Merge pull request #487 from WillCodeForCats/UnitOfTime-enum
Use UnitOfTime enum class
2 parents 3286345 + aa42faa commit f1f98a8

File tree

1 file changed

+2
-2
lines changed
  • custom_components/solaredge_modbus_multi

1 file changed

+2
-2
lines changed

custom_components/solaredge_modbus_multi/number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from homeassistant.components.number import NumberEntity
66
from homeassistant.config_entries import ConfigEntry
7-
from homeassistant.const import PERCENTAGE, TIME_SECONDS, UnitOfEnergy, UnitOfPower
7+
from homeassistant.const import PERCENTAGE, UnitOfEnergy, UnitOfPower, UnitOfTime
88
from homeassistant.core import HomeAssistant, callback
99
from homeassistant.helpers.entity import EntityCategory
1010
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@@ -235,7 +235,7 @@ async def async_set_native_value(self, value: float) -> None:
235235
class StorageCommandTimeout(SolarEdgeNumberBase):
236236
native_min_value = 0
237237
native_max_value = 86400 # 24h
238-
native_unit_of_measurement = TIME_SECONDS
238+
native_unit_of_measurement = UnitOfTime.SECONDS
239239
icon = "mdi:clock-end"
240240

241241
def __init__(self, inverter, config_entry, coordinator):

0 commit comments

Comments
 (0)