1 """BleBox switch implementation."""
3 from datetime
import timedelta
12 from .
import BleBoxConfigEntry
13 from .entity
import BleBoxEntity
20 config_entry: BleBoxConfigEntry,
21 async_add_entities: AddEntitiesCallback,
23 """Set up a BleBox switch entity."""
26 for feature
in config_entry.runtime_data.features.get(
"switches", [])
32 """Representation of a BleBox switch feature."""
34 _attr_device_class = SwitchDeviceClass.SWITCH
38 """Return whether switch is on."""
39 return self._feature.is_on
42 """Turn on the switch."""
46 """Turn off the switch."""
None async_turn_on(self, **Any kwargs)
None async_turn_off(self, **Any kwargs)
None async_setup_entry(HomeAssistant hass, BleBoxConfigEntry config_entry, AddEntitiesCallback async_add_entities)