Add icon translations to Ambient station (#108400)

This commit is contained in:
Joost Lekkerkerker 2024-01-19 20:28:36 +01:00 committed by GitHub
parent 94b39941e2
commit 4f998acb78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 7 deletions

View File

@ -0,0 +1,27 @@
{
"entity": {
"sensor": {
"last_rain": {
"default": "mdi:water"
},
"lightning_strikes_per_day": {
"default": "mdi:lightning-bolt"
},
"lightning_strikes_per_hour": {
"default": "mdi:lightning-bolt"
},
"wind_direction": {
"default": "mdi:weather-windy"
},
"wind_direction_average_10m": {
"default": "mdi:weather-windy"
},
"wind_direction_average_2m": {
"default": "mdi:weather-windy"
},
"wind_gust_direction": {
"default": "mdi:weather-windy"
}
}
}
}

View File

@ -281,20 +281,17 @@ SENSOR_DESCRIPTIONS = (
SensorEntityDescription( SensorEntityDescription(
key=TYPE_LASTRAIN, key=TYPE_LASTRAIN,
translation_key="last_rain", translation_key="last_rain",
icon="mdi:water",
device_class=SensorDeviceClass.TIMESTAMP, device_class=SensorDeviceClass.TIMESTAMP,
), ),
SensorEntityDescription( SensorEntityDescription(
key=TYPE_LIGHTNING_PER_DAY, key=TYPE_LIGHTNING_PER_DAY,
translation_key="lightning_strikes_per_day", translation_key="lightning_strikes_per_day",
icon="mdi:lightning-bolt",
native_unit_of_measurement="strikes", native_unit_of_measurement="strikes",
state_class=SensorStateClass.TOTAL, state_class=SensorStateClass.TOTAL,
), ),
SensorEntityDescription( SensorEntityDescription(
key=TYPE_LIGHTNING_PER_HOUR, key=TYPE_LIGHTNING_PER_HOUR,
translation_key="lightning_strikes_per_hour", translation_key="lightning_strikes_per_hour",
icon="mdi:lightning-bolt",
native_unit_of_measurement="strikes", native_unit_of_measurement="strikes",
state_class=SensorStateClass.TOTAL, state_class=SensorStateClass.TOTAL,
), ),
@ -595,25 +592,21 @@ SENSOR_DESCRIPTIONS = (
SensorEntityDescription( SensorEntityDescription(
key=TYPE_WINDDIR, key=TYPE_WINDDIR,
translation_key="wind_direction", translation_key="wind_direction",
icon="mdi:weather-windy",
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
), ),
SensorEntityDescription( SensorEntityDescription(
key=TYPE_WINDDIR_AVG10M, key=TYPE_WINDDIR_AVG10M,
translation_key="wind_direction_average_10m", translation_key="wind_direction_average_10m",
icon="mdi:weather-windy",
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
), ),
SensorEntityDescription( SensorEntityDescription(
key=TYPE_WINDDIR_AVG2M, key=TYPE_WINDDIR_AVG2M,
translation_key="wind_direction_average_2m", translation_key="wind_direction_average_2m",
icon="mdi:weather-windy",
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
), ),
SensorEntityDescription( SensorEntityDescription(
key=TYPE_WINDGUSTDIR, key=TYPE_WINDGUSTDIR,
translation_key="wind_gust_direction", translation_key="wind_gust_direction",
icon="mdi:weather-windy",
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
), ),
SensorEntityDescription( SensorEntityDescription(