1 """Support for KEBA charging station switch."""
3 from __future__
import annotations
12 from .
import DOMAIN, KebaHandler
18 async_add_entities: AddEntitiesCallback,
19 discovery_info: DiscoveryInfoType |
None =
None,
21 """Set up the KEBA charging station platform."""
22 if discovery_info
is None:
25 keba: KebaHandler = hass.data[DOMAIN]
27 locks = [
KebaLock(keba,
"Authentication",
"authentication")]
32 """The entity class for KEBA charging stations switch."""
34 _attr_should_poll =
False
36 def __init__(self, keba: KebaHandler, name: str, entity_type: str) ->
None:
37 """Initialize the KEBA switch."""
52 """Attempt to retrieve on off state from the switch."""
56 """Schedule a state update."""
60 """Add update callback after being added to hass."""
None async_unlock(self, **Any kwargs)
None async_lock(self, **Any kwargs)
None async_added_to_hass(self)
None __init__(self, KebaHandler keba, str name, str entity_type)
None update_callback(self)
None async_schedule_update_ha_state(self, bool force_refresh=False)
None async_setup_platform(HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
float|int|str|None get_value(Sensor sensor, str field)
None async_stop(HomeAssistant hass)
None async_start(HomeAssistant hass, str discovery_topic, ConfigEntry config_entry)