mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
New binary sensors for Ukraine Alarm (#76155)
new alert types for ukraine alarm
This commit is contained in:
parent
1806172551
commit
dd862595a3
@ -18,6 +18,8 @@ from . import UkraineAlarmDataUpdateCoordinator
|
||||
from .const import (
|
||||
ALERT_TYPE_AIR,
|
||||
ALERT_TYPE_ARTILLERY,
|
||||
ALERT_TYPE_CHEMICAL,
|
||||
ALERT_TYPE_NUCLEAR,
|
||||
ALERT_TYPE_UNKNOWN,
|
||||
ALERT_TYPE_URBAN_FIGHTS,
|
||||
ATTRIBUTION,
|
||||
@ -49,6 +51,18 @@ BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
||||
device_class=BinarySensorDeviceClass.SAFETY,
|
||||
icon="mdi:tank",
|
||||
),
|
||||
BinarySensorEntityDescription(
|
||||
key=ALERT_TYPE_CHEMICAL,
|
||||
name="Chemical",
|
||||
device_class=BinarySensorDeviceClass.SAFETY,
|
||||
icon="mdi:chemical-weapon",
|
||||
),
|
||||
BinarySensorEntityDescription(
|
||||
key=ALERT_TYPE_NUCLEAR,
|
||||
name="Nuclear",
|
||||
device_class=BinarySensorDeviceClass.SAFETY,
|
||||
icon="mdi:nuke",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@ -10,10 +10,14 @@ ALERT_TYPE_UNKNOWN = "UNKNOWN"
|
||||
ALERT_TYPE_AIR = "AIR"
|
||||
ALERT_TYPE_ARTILLERY = "ARTILLERY"
|
||||
ALERT_TYPE_URBAN_FIGHTS = "URBAN_FIGHTS"
|
||||
ALERT_TYPE_CHEMICAL = "CHEMICAL"
|
||||
ALERT_TYPE_NUCLEAR = "NUCLEAR"
|
||||
ALERT_TYPES = {
|
||||
ALERT_TYPE_UNKNOWN,
|
||||
ALERT_TYPE_AIR,
|
||||
ALERT_TYPE_ARTILLERY,
|
||||
ALERT_TYPE_URBAN_FIGHTS,
|
||||
ALERT_TYPE_CHEMICAL,
|
||||
ALERT_TYPE_NUCLEAR,
|
||||
}
|
||||
PLATFORMS = [Platform.BINARY_SENSOR]
|
||||
|
Loading…
x
Reference in New Issue
Block a user