1 """Support for Fully Kiosk Browser notifications."""
3 from __future__
import annotations
5 from dataclasses
import dataclass
7 from fullykiosk
import FullyKioskError
14 from .
import FullyKioskConfigEntry
15 from .coordinator
import FullyKioskDataUpdateCoordinator
16 from .entity
import FullyKioskEntity
19 @dataclass(frozen=True, kw_only=True)
21 """Fully Kiosk Browser notify entity description."""
26 NOTIFIERS: tuple[FullyNotifyEntityDescription, ...] = (
28 key=
"overlay_message",
29 translation_key=
"overlay_message",
30 cmd=
"setOverlayMessage",
34 translation_key=
"tts",
42 entry: FullyKioskConfigEntry,
43 async_add_entities: AddEntitiesCallback,
45 """Set up the Fully Kiosk Browser notify entities."""
46 coordinator = entry.runtime_data
53 """Implement the notify entity for Fully Kiosk Browser."""
55 entity_description: FullyNotifyEntityDescription
59 coordinator: FullyKioskDataUpdateCoordinator,
60 description: FullyNotifyEntityDescription,
62 """Initialize the entity."""
63 FullyKioskEntity.__init__(self, coordinator)
64 NotifyEntity.__init__(self)
66 self.
_attr_unique_id_attr_unique_id = f
"{coordinator.data['deviceID']}-{description.key}"
71 await self.coordinator.fully.sendCommand(
74 except FullyKioskError
as err:
None async_send_message(self, str message, str|None title=None)
None __init__(self, FullyKioskDataUpdateCoordinator coordinator, FullyNotifyEntityDescription description)
None async_setup_entry(HomeAssistant hass, FullyKioskConfigEntry entry, AddEntitiesCallback async_add_entities)