Add icon translations to Opensky (#111994)

* Add icon translations to Opensky

* Add icon translations to Opensky
This commit is contained in:
Joost Lekkerkerker 2024-03-02 00:56:34 +01:00 committed by GitHub
parent 46a86667d3
commit dd2d7e579d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,9 @@
{
"entity": {
"sensor": {
"flights": {
"default": "mdi:airplane"
}
}
}
}

View File

@ -38,7 +38,7 @@ class OpenSkySensor(CoordinatorEntity[OpenSkyDataUpdateCoordinator], SensorEntit
) )
_attr_has_entity_name = True _attr_has_entity_name = True
_attr_name = None _attr_name = None
_attr_icon = "mdi:airplane" _attr_translation_key = "flights"
_attr_native_unit_of_measurement = "flights" _attr_native_unit_of_measurement = "flights"
_attr_state_class = SensorStateClass.MEASUREMENT _attr_state_class = SensorStateClass.MEASUREMENT

View File

@ -4,7 +4,6 @@
'attributes': ReadOnlyDict({ 'attributes': ReadOnlyDict({
'attribution': 'Information provided by the OpenSky Network (https://opensky-network.org)', 'attribution': 'Information provided by the OpenSky Network (https://opensky-network.org)',
'friendly_name': 'OpenSky', 'friendly_name': 'OpenSky',
'icon': 'mdi:airplane',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': 'flights', 'unit_of_measurement': 'flights',
}), }),
@ -20,7 +19,6 @@
'attributes': ReadOnlyDict({ 'attributes': ReadOnlyDict({
'attribution': 'Information provided by the OpenSky Network (https://opensky-network.org)', 'attribution': 'Information provided by the OpenSky Network (https://opensky-network.org)',
'friendly_name': 'OpenSky', 'friendly_name': 'OpenSky',
'icon': 'mdi:airplane',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': 'flights', 'unit_of_measurement': 'flights',
}), }),