1 """Support for ESPHome event components."""
3 from __future__
import annotations
5 from functools
import partial
7 from aioesphomeapi
import EntityInfo, Event, EventInfo
13 from .entity
import EsphomeEntity, platform_async_setup_entry
17 """An event implementation for ESPHome."""
21 """Set attrs from static info."""
24 if event_types := static_info.event_types:
27 EventDeviceClass, static_info.device_class
37 async_setup_entry = partial(
38 platform_async_setup_entry,
40 entity_type=EsphomeEvent,
None _update_state_from_entry_data(self)
None _on_state_update(self)
None _on_static_info_update(self, EntityInfo static_info)
None _trigger_event(self, str event_type, dict[str, Any]|None event_attributes=None)
None async_write_ha_state(self)