1 """Support for Tibber notifications."""
3 from __future__
import annotations
5 from tibber
import Tibber
17 from .
import DOMAIN
as TIBBER_DOMAIN
21 hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
23 """Set up the Tibber notification entity."""
28 """Implement the notification entity service for Tibber."""
30 _attr_supported_features = NotifyEntityFeature.TITLE
31 _attr_name = TIBBER_DOMAIN
32 _attr_icon =
"mdi:message-flash"
35 """Initialize Tibber notify entity."""
39 """Send a message to Tibber devices."""
40 tibber_connection: Tibber = self.
hasshass.data[TIBBER_DOMAIN]
42 await tibber_connection.send_notification(
43 title
or ATTR_TITLE_DEFAULT, message
45 except TimeoutError
as exc:
47 translation_domain=TIBBER_DOMAIN, translation_key=
"send_message_timeout"
None __init__(self, str unique_id)
None async_send_message(self, str message, str|None title=None)
None async_setup_entry(HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)