1 """Demo platform that offers a fake button entity."""
3 from __future__
import annotations
17 config_entry: ConfigEntry,
18 async_add_entities: AddEntitiesCallback,
20 """Set up the demo button platform."""
32 """Representation of a demo button entity."""
34 _attr_has_entity_name =
True
36 _attr_should_poll =
False
43 """Initialize the Demo button entity."""
46 identifiers={(DOMAIN, unique_id)},
51 """Send out a persistent notification."""
52 persistent_notification.async_create(
53 self.
hasshass,
"Button pressed", title=
"Button"
55 self.
hasshass.bus.async_fire(
"demo_button_pressed")