From b092698418510ba7782b1d77094060837ae315fc Mon Sep 17 00:00:00 2001 From: G Johansson Date: Fri, 3 Feb 2023 17:07:50 +0100 Subject: [PATCH] Fix UoM and device_class in Trafikverket Weather (#87308) --- .../components/trafikverket_weatherstation/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/trafikverket_weatherstation/sensor.py b/homeassistant/components/trafikverket_weatherstation/sensor.py index d50ba66d8e0..c8eed559f7c 100644 --- a/homeassistant/components/trafikverket_weatherstation/sensor.py +++ b/homeassistant/components/trafikverket_weatherstation/sensor.py @@ -14,9 +14,9 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( DEGREE, PERCENTAGE, - UnitOfPrecipitationDepth, UnitOfSpeed, UnitOfTemperature, + UnitOfVolumetricFlux, ) from homeassistant.core import HomeAssistant from homeassistant.helpers.device_registry import DeviceEntryType @@ -114,8 +114,8 @@ SENSOR_TYPES: tuple[TrafikverketSensorEntityDescription, ...] = ( key="precipitation_amount", api_key="precipitation_amount", name="Precipitation amount", - native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS, - device_class=SensorDeviceClass.PRECIPITATION, + native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR, + device_class=SensorDeviceClass.PRECIPITATION_INTENSITY, state_class=SensorStateClass.MEASUREMENT, ), TrafikverketSensorEntityDescription(