1 """Demo platform that offers a fake select entity."""
3 from __future__
import annotations
16 config_entry: ConfigEntry,
17 async_add_entities: AddEntitiesCallback,
19 """Set up the demo select platform."""
25 current_option=
"ridiculous_speed",
31 translation_key=
"speed",
38 """Representation of a demo select entity."""
40 _attr_has_entity_name =
True
42 _attr_should_poll =
False
48 current_option: str |
None,
52 """Initialize the Demo select entity."""
58 identifiers={(DOMAIN, unique_id)},
63 """Update the current selected option."""
None __init__(self, str unique_id, str device_name, str|None current_option, list[str] options, str translation_key)
None async_select_option(self, str option)
None async_write_ha_state(self)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)