Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #562 from Airler/patch-1
Browse files Browse the repository at this point in the history
Fixed Unit deprecation warning
  • Loading branch information
Thomas55555 authored Jan 4, 2024
2 parents 6b938fc + 1176aa9 commit 4c58151
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/husqvarna_automower/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from aiohttp import ClientResponseError
from homeassistant.components.number import NumberEntity, NumberEntityDescription
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import TIME_MINUTES
from homeassistant.const import UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
Expand Down Expand Up @@ -45,14 +45,14 @@ async def async_setup_entry(
translation_key="park_for",
icon="mdi:clock-outline",
entity_registry_enabled_default=True,
native_unit_of_measurement=TIME_MINUTES,
native_unit_of_measurement=UnitOfTime.MINUTES,
),
NumberEntityDescription(
key="Start",
translation_key="mow_for",
icon="mdi:clock-outline",
entity_registry_enabled_default=True,
native_unit_of_measurement=TIME_MINUTES,
native_unit_of_measurement=UnitOfTime.MINUTES,
),
)

Expand Down

0 comments on commit 4c58151

Please sign in to comment.