Use UnitOfTime in integrations (h-s) (#84289)

This commit is contained in:
epenet 2022-12-20 13:21:14 +01:00 committed by GitHub
parent 6a8d9a91cb
commit 55a5e17cf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 64 additions and 75 deletions

View file

@ -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