mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 23:57:06 +00:00
Add icon translations to Weatherflow (#112353)
This commit is contained in:
parent
9d89adb3d0
commit
102dbdabb5
21
homeassistant/components/weatherflow/icons.json
Normal file
21
homeassistant/components/weatherflow/icons.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"lightning_average_distance": {
|
||||||
|
"default": "mdi:lightning-bolt"
|
||||||
|
},
|
||||||
|
"lightning_count": {
|
||||||
|
"default": "mdi:lightning-bolt"
|
||||||
|
},
|
||||||
|
"precipitation_type": {
|
||||||
|
"default": "mdi:weather-rainy"
|
||||||
|
},
|
||||||
|
"wind_direction": {
|
||||||
|
"default": "mdi:compass-outline"
|
||||||
|
},
|
||||||
|
"wind_direction_average": {
|
||||||
|
"default": "mdi:compass-outline"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -138,7 +138,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
),
|
),
|
||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="lightning_strike_average_distance",
|
key="lightning_strike_average_distance",
|
||||||
icon="mdi:lightning-bolt",
|
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
device_class=SensorDeviceClass.DISTANCE,
|
device_class=SensorDeviceClass.DISTANCE,
|
||||||
native_unit_of_measurement=UnitOfLength.KILOMETERS,
|
native_unit_of_measurement=UnitOfLength.KILOMETERS,
|
||||||
@ -149,7 +148,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="lightning_strike_count",
|
key="lightning_strike_count",
|
||||||
translation_key="lightning_count",
|
translation_key="lightning_count",
|
||||||
icon="mdi:lightning-bolt",
|
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
raw_data_conv_fn=lambda raw_data: raw_data,
|
raw_data_conv_fn=lambda raw_data: raw_data,
|
||||||
),
|
),
|
||||||
@ -158,12 +156,10 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
translation_key="precipitation_type",
|
translation_key="precipitation_type",
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
options=["none", "rain", "hail", "rain_hail", "unknown"],
|
options=["none", "rain", "hail", "rain_hail", "unknown"],
|
||||||
icon="mdi:weather-rainy",
|
|
||||||
raw_data_conv_fn=precipitation_raw_conversion_fn,
|
raw_data_conv_fn=precipitation_raw_conversion_fn,
|
||||||
),
|
),
|
||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="rain_accumulation_previous_minute",
|
key="rain_accumulation_previous_minute",
|
||||||
icon="mdi:weather-rainy",
|
|
||||||
native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
|
native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
device_class=SensorDeviceClass.PRECIPITATION,
|
device_class=SensorDeviceClass.PRECIPITATION,
|
||||||
@ -174,7 +170,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
key="rain_rate",
|
key="rain_rate",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||||
icon="mdi:weather-rainy",
|
|
||||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||||
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
|
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
|
||||||
),
|
),
|
||||||
@ -242,7 +237,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="wind_gust",
|
key="wind_gust",
|
||||||
translation_key="wind_gust",
|
translation_key="wind_gust",
|
||||||
icon="mdi:weather-windy",
|
|
||||||
device_class=SensorDeviceClass.WIND_SPEED,
|
device_class=SensorDeviceClass.WIND_SPEED,
|
||||||
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -252,7 +246,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="wind_lull",
|
key="wind_lull",
|
||||||
translation_key="wind_lull",
|
translation_key="wind_lull",
|
||||||
icon="mdi:weather-windy",
|
|
||||||
device_class=SensorDeviceClass.WIND_SPEED,
|
device_class=SensorDeviceClass.WIND_SPEED,
|
||||||
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -262,7 +255,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="wind_speed",
|
key="wind_speed",
|
||||||
device_class=SensorDeviceClass.WIND_SPEED,
|
device_class=SensorDeviceClass.WIND_SPEED,
|
||||||
icon="mdi:weather-windy",
|
|
||||||
event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION],
|
event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION],
|
||||||
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -272,7 +264,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="wind_average",
|
key="wind_average",
|
||||||
translation_key="wind_speed_average",
|
translation_key="wind_speed_average",
|
||||||
icon="mdi:weather-windy",
|
|
||||||
device_class=SensorDeviceClass.WIND_SPEED,
|
device_class=SensorDeviceClass.WIND_SPEED,
|
||||||
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -282,7 +273,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="wind_direction",
|
key="wind_direction",
|
||||||
translation_key="wind_direction",
|
translation_key="wind_direction",
|
||||||
icon="mdi:compass-outline",
|
|
||||||
native_unit_of_measurement=DEGREE,
|
native_unit_of_measurement=DEGREE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION],
|
event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION],
|
||||||
@ -291,7 +281,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
|
|||||||
WeatherFlowSensorEntityDescription(
|
WeatherFlowSensorEntityDescription(
|
||||||
key="wind_direction_average",
|
key="wind_direction_average",
|
||||||
translation_key="wind_direction_average",
|
translation_key="wind_direction_average",
|
||||||
icon="mdi:compass-outline",
|
|
||||||
native_unit_of_measurement=DEGREE,
|
native_unit_of_measurement=DEGREE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
|
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user