Use UnitOfTime in integrations (h-s) (#84289)
This commit is contained in:
parent
6a8d9a91cb
commit
55a5e17cf2
24 changed files with 64 additions and 75 deletions
|
@ -12,7 +12,7 @@ from homeassistant.const import (
|
|||
ATTR_LONGITUDE,
|
||||
CONF_NAME,
|
||||
CONF_SHOW_ON_MAP,
|
||||
TIME_MINUTES,
|
||||
UnitOfTime,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
@ -177,7 +177,7 @@ class NMBSSensor(SensorEntity):
|
|||
"""Get the total travel time for a given connection."""
|
||||
|
||||
_attr_attribution = "https://api.irail.be/"
|
||||
_attr_native_unit_of_measurement = TIME_MINUTES
|
||||
_attr_native_unit_of_measurement = UnitOfTime.MINUTES
|
||||
|
||||
def __init__(
|
||||
self, api_client, name, show_on_map, station_from, station_to, excl_vias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue