Add sun icon translations (#108462)

pull/108174/head
Jan Rieger 2024-01-20 21:16:32 +01:00 committed by GitHub
parent 1d35665107
commit d81682e02a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 9 deletions

View File

@ -0,0 +1,33 @@
{
"entity": {
"sensor": {
"next_dawn": {
"default": "mdi:sun-clock"
},
"next_dusk": {
"default": "mdi:sun-clock"
},
"next_midnight": {
"default": "mdi:sun-clock"
},
"next_noon": {
"default": "mdi:sun-clock"
},
"next_rising": {
"default": "mdi:sun-clock"
},
"next_setting": {
"default": "mdi:sun-clock"
},
"solar_elevation": {
"default": "mdi:theme-light-dark"
},
"solar_azimuth": {
"default": "mdi:sun-angle"
},
"solar_rising": {
"default": "mdi:sun-clock"
}
}
}
}

View File

@ -39,7 +39,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
key="next_dawn",
device_class=SensorDeviceClass.TIMESTAMP,
translation_key="next_dawn",
icon="mdi:sun-clock",
value_fn=lambda data: data.next_dawn,
signal=SIGNAL_EVENTS_CHANGED,
),
@ -47,7 +46,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
key="next_dusk",
device_class=SensorDeviceClass.TIMESTAMP,
translation_key="next_dusk",
icon="mdi:sun-clock",
value_fn=lambda data: data.next_dusk,
signal=SIGNAL_EVENTS_CHANGED,
),
@ -55,7 +53,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
key="next_midnight",
device_class=SensorDeviceClass.TIMESTAMP,
translation_key="next_midnight",
icon="mdi:sun-clock",
value_fn=lambda data: data.next_midnight,
signal=SIGNAL_EVENTS_CHANGED,
),
@ -63,7 +60,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
key="next_noon",
device_class=SensorDeviceClass.TIMESTAMP,
translation_key="next_noon",
icon="mdi:sun-clock",
value_fn=lambda data: data.next_noon,
signal=SIGNAL_EVENTS_CHANGED,
),
@ -71,7 +67,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
key="next_rising",
device_class=SensorDeviceClass.TIMESTAMP,
translation_key="next_rising",
icon="mdi:sun-clock",
value_fn=lambda data: data.next_rising,
signal=SIGNAL_EVENTS_CHANGED,
),
@ -79,14 +74,12 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
key="next_setting",
device_class=SensorDeviceClass.TIMESTAMP,
translation_key="next_setting",
icon="mdi:sun-clock",
value_fn=lambda data: data.next_setting,
signal=SIGNAL_EVENTS_CHANGED,
),
SunSensorEntityDescription(
key="solar_elevation",
translation_key="solar_elevation",
icon="mdi:theme-light-dark",
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda data: data.solar_elevation,
entity_registry_enabled_default=False,
@ -96,7 +89,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
SunSensorEntityDescription(
key="solar_azimuth",
translation_key="solar_azimuth",
icon="mdi:sun-angle",
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda data: data.solar_azimuth,
entity_registry_enabled_default=False,
@ -106,7 +98,6 @@ SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
SunSensorEntityDescription(
key="solar_rising",
translation_key="solar_rising",
icon="mdi:sun-clock",
value_fn=lambda data: data.rising,
entity_registry_enabled_default=False,
signal=SIGNAL_EVENTS_CHANGED,