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

Fixed Unit deprecation warning #562

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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