mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix UoM and device_class in Trafikverket Weather (#87308)
This commit is contained in:
parent
cf39403282
commit
b092698418
@ -14,9 +14,9 @@ from homeassistant.config_entries import ConfigEntry
|
|||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
DEGREE,
|
DEGREE,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
UnitOfPrecipitationDepth,
|
|
||||||
UnitOfSpeed,
|
UnitOfSpeed,
|
||||||
UnitOfTemperature,
|
UnitOfTemperature,
|
||||||
|
UnitOfVolumetricFlux,
|
||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||||
@ -114,8 +114,8 @@ SENSOR_TYPES: tuple[TrafikverketSensorEntityDescription, ...] = (
|
|||||||
key="precipitation_amount",
|
key="precipitation_amount",
|
||||||
api_key="precipitation_amount",
|
api_key="precipitation_amount",
|
||||||
name="Precipitation amount",
|
name="Precipitation amount",
|
||||||
native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
|
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||||
device_class=SensorDeviceClass.PRECIPITATION,
|
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
TrafikverketSensorEntityDescription(
|
TrafikverketSensorEntityDescription(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user