1 """Switch support for the Skybell HD Doorbell."""
3 from __future__
import annotations
5 from typing
import Any, cast
12 from .const
import DOMAIN
13 from .entity
import SkybellEntity
15 SWITCH_TYPES: tuple[SwitchEntityDescription, ...] = (
18 translation_key=
"do_not_disturb",
22 translation_key=
"do_not_ring",
26 translation_key=
"motion_sensor",
32 hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
34 """Set up the SkyBell switch."""
37 for coordinator
in hass.data[DOMAIN][entry.entry_id]
38 for description
in SWITCH_TYPES
43 """A switch implementation for Skybell devices."""
46 """Turn on the switch."""
50 """Turn off the switch."""
54 def is_on(self) -> bool:
55 """Return true if entity is on."""
SkybellDevice _device(self)
None async_turn_on(self, **Any kwargs)
None async_turn_off(self, **Any kwargs)
None async_setup_entry(HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)