Add icon translations to Opensky (#111994)
* Add icon translations to Opensky * Add icon translations to Opensky
This commit is contained in:
parent
46a86667d3
commit
dd2d7e579d
3 changed files with 10 additions and 3 deletions
9
homeassistant/components/opensky/icons.json
Normal file
9
homeassistant/components/opensky/icons.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"flights": {
|
||||
"default": "mdi:airplane"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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',
|
||||
}),
|
||||
|
|
Loading…
Add table
Reference in a new issue