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_name = None
_attr_icon = "mdi:airplane"
_attr_translation_key = "flights"
_attr_native_unit_of_measurement = "flights"
_attr_state_class = SensorStateClass.MEASUREMENT

View file

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