From f5355c833e4e9afc471b80b6e345633b3368136d Mon Sep 17 00:00:00 2001 From: "Etienne C." <59794011+etiennec78@users.noreply.github.com> Date: Mon, 16 Jun 2025 15:14:43 +0200 Subject: [PATCH] Add duration device class in Here Travel Time sensors (#146804) --- homeassistant/components/here_travel_time/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/here_travel_time/sensor.py b/homeassistant/components/here_travel_time/sensor.py index bbaabb56d46..71184797a2e 100644 --- a/homeassistant/components/here_travel_time/sensor.py +++ b/homeassistant/components/here_travel_time/sensor.py @@ -55,6 +55,7 @@ def sensor_descriptions(travel_mode: str) -> tuple[SensorEntityDescription, ...] icon=ICONS.get(travel_mode, ICON_CAR), key=ATTR_DURATION, state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.DURATION, native_unit_of_measurement=UnitOfTime.MINUTES, ), SensorEntityDescription( @@ -62,6 +63,7 @@ def sensor_descriptions(travel_mode: str) -> tuple[SensorEntityDescription, ...] icon=ICONS.get(travel_mode, ICON_CAR), key=ATTR_DURATION_IN_TRAFFIC, state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.DURATION, native_unit_of_measurement=UnitOfTime.MINUTES, ), SensorEntityDescription(