Add icon translations to Environment Canada (#111527)
* Add icon translations to Environment Canada * Add icon translations to Environment Canadapull/111709/head
parent
dfd8179a2d
commit
e2c38c6415
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"advisories": {
|
||||
"default": "mdi:bell-alert"
|
||||
},
|
||||
"endings": {
|
||||
"default": "mdi:alert-circle-check"
|
||||
},
|
||||
"statements": {
|
||||
"default": "mdi:bell-alert"
|
||||
},
|
||||
"warnings": {
|
||||
"default": "mdi:alert-octagon"
|
||||
},
|
||||
"watches": {
|
||||
"default": "mdi:alert"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"set_radar_type": "mdi:radar"
|
||||
}
|
||||
}
|
|
@ -235,35 +235,30 @@ ALERT_TYPES: tuple[ECSensorEntityDescription, ...] = (
|
|||
ECSensorEntityDescription(
|
||||
key="advisories",
|
||||
translation_key="advisories",
|
||||
icon="mdi:bell-alert",
|
||||
value_fn=lambda data: data.alerts.get("advisories", {}).get("value"),
|
||||
transform=len,
|
||||
),
|
||||
ECSensorEntityDescription(
|
||||
key="endings",
|
||||
translation_key="endings",
|
||||
icon="mdi:alert-circle-check",
|
||||
value_fn=lambda data: data.alerts.get("endings", {}).get("value"),
|
||||
transform=len,
|
||||
),
|
||||
ECSensorEntityDescription(
|
||||
key="statements",
|
||||
translation_key="statements",
|
||||
icon="mdi:bell-alert",
|
||||
value_fn=lambda data: data.alerts.get("statements", {}).get("value"),
|
||||
transform=len,
|
||||
),
|
||||
ECSensorEntityDescription(
|
||||
key="warnings",
|
||||
translation_key="warnings",
|
||||
icon="mdi:alert-octagon",
|
||||
value_fn=lambda data: data.alerts.get("warnings", {}).get("value"),
|
||||
transform=len,
|
||||
),
|
||||
ECSensorEntityDescription(
|
||||
key="watches",
|
||||
translation_key="watches",
|
||||
icon="mdi:alert",
|
||||
value_fn=lambda data: data.alerts.get("watches", {}).get("value"),
|
||||
transform=len,
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue