diff --git a/homeassistant/components/weatherflow/icons.json b/homeassistant/components/weatherflow/icons.json new file mode 100644 index 00000000000..71a8b48415d --- /dev/null +++ b/homeassistant/components/weatherflow/icons.json @@ -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" + } + } + } +} diff --git a/homeassistant/components/weatherflow/sensor.py b/homeassistant/components/weatherflow/sensor.py index bbdd79e1533..74642ae04af 100644 --- a/homeassistant/components/weatherflow/sensor.py +++ b/homeassistant/components/weatherflow/sensor.py @@ -138,7 +138,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( ), WeatherFlowSensorEntityDescription( key="lightning_strike_average_distance", - icon="mdi:lightning-bolt", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.DISTANCE, native_unit_of_measurement=UnitOfLength.KILOMETERS, @@ -149,7 +148,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="lightning_strike_count", translation_key="lightning_count", - icon="mdi:lightning-bolt", state_class=SensorStateClass.TOTAL, raw_data_conv_fn=lambda raw_data: raw_data, ), @@ -158,12 +156,10 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( translation_key="precipitation_type", device_class=SensorDeviceClass.ENUM, options=["none", "rain", "hail", "rain_hail", "unknown"], - icon="mdi:weather-rainy", raw_data_conv_fn=precipitation_raw_conversion_fn, ), WeatherFlowSensorEntityDescription( key="rain_accumulation_previous_minute", - icon="mdi:weather-rainy", native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS, state_class=SensorStateClass.TOTAL, device_class=SensorDeviceClass.PRECIPITATION, @@ -174,7 +170,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( key="rain_rate", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.PRECIPITATION_INTENSITY, - icon="mdi:weather-rainy", native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR, raw_data_conv_fn=lambda raw_data: raw_data.magnitude, ), @@ -242,7 +237,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="wind_gust", translation_key="wind_gust", - icon="mdi:weather-windy", device_class=SensorDeviceClass.WIND_SPEED, native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND, state_class=SensorStateClass.MEASUREMENT, @@ -252,7 +246,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="wind_lull", translation_key="wind_lull", - icon="mdi:weather-windy", device_class=SensorDeviceClass.WIND_SPEED, native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND, state_class=SensorStateClass.MEASUREMENT, @@ -262,7 +255,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="wind_speed", device_class=SensorDeviceClass.WIND_SPEED, - icon="mdi:weather-windy", event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION], native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND, state_class=SensorStateClass.MEASUREMENT, @@ -272,7 +264,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="wind_average", translation_key="wind_speed_average", - icon="mdi:weather-windy", device_class=SensorDeviceClass.WIND_SPEED, native_unit_of_measurement=UnitOfSpeed.METERS_PER_SECOND, state_class=SensorStateClass.MEASUREMENT, @@ -282,7 +273,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="wind_direction", translation_key="wind_direction", - icon="mdi:compass-outline", native_unit_of_measurement=DEGREE, state_class=SensorStateClass.MEASUREMENT, event_subscriptions=[EVENT_RAPID_WIND, EVENT_OBSERVATION], @@ -291,7 +281,6 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = ( WeatherFlowSensorEntityDescription( key="wind_direction_average", translation_key="wind_direction_average", - icon="mdi:compass-outline", native_unit_of_measurement=DEGREE, state_class=SensorStateClass.MEASUREMENT, raw_data_conv_fn=lambda raw_data: raw_data.magnitude,