mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Add icon translations to FAA delays (#111533)
This commit is contained in:
parent
2f38ce2813
commit
882f28bb5f
@ -33,7 +33,6 @@ FAA_BINARY_SENSORS: tuple[FaaDelaysBinarySensorEntityDescription, ...] = (
|
|||||||
FaaDelaysBinarySensorEntityDescription(
|
FaaDelaysBinarySensorEntityDescription(
|
||||||
key="GROUND_DELAY",
|
key="GROUND_DELAY",
|
||||||
translation_key="ground_delay",
|
translation_key="ground_delay",
|
||||||
icon="mdi:airport",
|
|
||||||
is_on_fn=lambda airport: airport.ground_delay.status,
|
is_on_fn=lambda airport: airport.ground_delay.status,
|
||||||
extra_state_attributes_fn=lambda airport: {
|
extra_state_attributes_fn=lambda airport: {
|
||||||
"average": airport.ground_delay.average,
|
"average": airport.ground_delay.average,
|
||||||
@ -43,7 +42,6 @@ FAA_BINARY_SENSORS: tuple[FaaDelaysBinarySensorEntityDescription, ...] = (
|
|||||||
FaaDelaysBinarySensorEntityDescription(
|
FaaDelaysBinarySensorEntityDescription(
|
||||||
key="GROUND_STOP",
|
key="GROUND_STOP",
|
||||||
translation_key="ground_stop",
|
translation_key="ground_stop",
|
||||||
icon="mdi:airport",
|
|
||||||
is_on_fn=lambda airport: airport.ground_stop.status,
|
is_on_fn=lambda airport: airport.ground_stop.status,
|
||||||
extra_state_attributes_fn=lambda airport: {
|
extra_state_attributes_fn=lambda airport: {
|
||||||
"endtime": airport.ground_stop.endtime,
|
"endtime": airport.ground_stop.endtime,
|
||||||
@ -53,7 +51,6 @@ FAA_BINARY_SENSORS: tuple[FaaDelaysBinarySensorEntityDescription, ...] = (
|
|||||||
FaaDelaysBinarySensorEntityDescription(
|
FaaDelaysBinarySensorEntityDescription(
|
||||||
key="DEPART_DELAY",
|
key="DEPART_DELAY",
|
||||||
translation_key="depart_delay",
|
translation_key="depart_delay",
|
||||||
icon="mdi:airplane-takeoff",
|
|
||||||
is_on_fn=lambda airport: airport.depart_delay.status,
|
is_on_fn=lambda airport: airport.depart_delay.status,
|
||||||
extra_state_attributes_fn=lambda airport: {
|
extra_state_attributes_fn=lambda airport: {
|
||||||
"minimum": airport.depart_delay.minimum,
|
"minimum": airport.depart_delay.minimum,
|
||||||
@ -65,7 +62,6 @@ FAA_BINARY_SENSORS: tuple[FaaDelaysBinarySensorEntityDescription, ...] = (
|
|||||||
FaaDelaysBinarySensorEntityDescription(
|
FaaDelaysBinarySensorEntityDescription(
|
||||||
key="ARRIVE_DELAY",
|
key="ARRIVE_DELAY",
|
||||||
translation_key="arrive_delay",
|
translation_key="arrive_delay",
|
||||||
icon="mdi:airplane-landing",
|
|
||||||
is_on_fn=lambda airport: airport.arrive_delay.status,
|
is_on_fn=lambda airport: airport.arrive_delay.status,
|
||||||
extra_state_attributes_fn=lambda airport: {
|
extra_state_attributes_fn=lambda airport: {
|
||||||
"minimum": airport.arrive_delay.minimum,
|
"minimum": airport.arrive_delay.minimum,
|
||||||
@ -77,7 +73,6 @@ FAA_BINARY_SENSORS: tuple[FaaDelaysBinarySensorEntityDescription, ...] = (
|
|||||||
FaaDelaysBinarySensorEntityDescription(
|
FaaDelaysBinarySensorEntityDescription(
|
||||||
key="CLOSURE",
|
key="CLOSURE",
|
||||||
translation_key="closure",
|
translation_key="closure",
|
||||||
icon="mdi:airplane:off",
|
|
||||||
is_on_fn=lambda airport: airport.closure.status,
|
is_on_fn=lambda airport: airport.closure.status,
|
||||||
extra_state_attributes_fn=lambda airport: {
|
extra_state_attributes_fn=lambda airport: {
|
||||||
"begin": airport.closure.start,
|
"begin": airport.closure.start,
|
||||||
|
21
homeassistant/components/faa_delays/icons.json
Normal file
21
homeassistant/components/faa_delays/icons.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"ground_delay": {
|
||||||
|
"default": "mdi:airport"
|
||||||
|
},
|
||||||
|
"ground_stop": {
|
||||||
|
"default": "mdi:airport"
|
||||||
|
},
|
||||||
|
"depart_delay": {
|
||||||
|
"default": "mdi:airplane-takeoff"
|
||||||
|
},
|
||||||
|
"arrive_delay": {
|
||||||
|
"default": "mdi:airplane-landing"
|
||||||
|
},
|
||||||
|
"closure": {
|
||||||
|
"default": "mdi:airplane-off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user