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

Commit

Permalink
Fixed Unit deprecation warning
Browse files Browse the repository at this point in the history
Replaced TIME_MINUTES with UnitOfTime.MINUTES to fix deprecation warning.
  • Loading branch information
Airler authored Jan 4, 2024
1 parent 5002981 commit 5a5ca0c
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 5a5ca0c

Please sign in to comment.