mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use precipitation_intensity class in integrations (#80615)
This commit is contained in:
parent
7a04ba96f3
commit
7796f361fc
@ -209,6 +209,7 @@ FORECAST_SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key=ATTR_API_FORECAST_PRECIPITATION,
|
||||
name="Precipitation",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=ATTR_API_FORECAST_PRECIPITATION_PROBABILITY,
|
||||
@ -266,6 +267,7 @@ WEATHER_SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key=ATTR_API_RAIN,
|
||||
name="Rain",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=ATTR_API_RAIN_PROB,
|
||||
@ -277,6 +279,7 @@ WEATHER_SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key=ATTR_API_SNOW,
|
||||
name="Snow",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=ATTR_API_SNOW_PROB,
|
||||
|
@ -194,9 +194,9 @@ SENSOR_DESCRIPTIONS = (
|
||||
SensorEntityDescription(
|
||||
key=TYPE_HOURLYRAININ,
|
||||
name="Hourly rain rate",
|
||||
icon="mdi:water",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.INCHES_PER_HOUR,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_HUMIDITY10,
|
||||
|
@ -184,8 +184,8 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key="precipitation",
|
||||
name="Precipitation",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
icon="mdi:weather-pouring",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="irradiance",
|
||||
@ -198,7 +198,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key="precipitation_forecast_average",
|
||||
name="Precipitation forecast average",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
icon="mdi:weather-pouring",
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="precipitation_forecast_total",
|
||||
|
@ -158,11 +158,13 @@ ECOWITT_SENSORS_MAPPING: Final = {
|
||||
key="RAIN_RATE_MM",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
EcoWittSensorTypes.RAIN_RATE_INCHES: SensorEntityDescription(
|
||||
key="RAIN_RATE_INCHES",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.INCHES_PER_HOUR,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
EcoWittSensorTypes.LIGHTNING_DISTANCE_KM: SensorEntityDescription(
|
||||
key="LIGHTNING_DISTANCE_KM",
|
||||
|
@ -173,6 +173,7 @@ SENSOR_TYPES = (
|
||||
name="Rain rate",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
RfxtrxSensorEntityDescription(
|
||||
key="Sound",
|
||||
|
@ -58,8 +58,8 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = {
|
||||
key=SENSOR_TYPE_RAINRATE,
|
||||
name="Rain rate",
|
||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||
icon="mdi:water",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||
),
|
||||
SENSOR_TYPE_RAINTOTAL: SensorEntityDescription(
|
||||
key=SENSOR_TYPE_RAINTOTAL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user