1 """Support for Vera switches."""
3 from __future__
import annotations
7 import pyvera
as veraApi
15 from .common
import ControllerData, get_controller_data
16 from .entity
import VeraEntity
22 async_add_entities: AddEntitiesCallback,
24 """Set up the sensor config entry."""
29 for device
in controller_data.devices[Platform.SWITCH]
36 """Representation of a Vera Switch."""
41 self, vera_device: veraApi.VeraSwitch, controller_data: ControllerData
43 """Initialize the Vera device."""
44 VeraEntity.__init__(self, vera_device, controller_data)
49 self.vera_device.switch_on()
54 """Turn device off."""
55 self.vera_device.switch_off()
60 """Update device state."""
None __init__(self, veraApi.VeraSwitch vera_device, ControllerData controller_data)
None turn_off(self, **Any kwargs)
None turn_on(self, **Any kwargs)
None schedule_update_ha_state(self, bool force_refresh=False)
ControllerData get_controller_data(HomeAssistant hass, ConfigEntry config_entry)
None async_setup_entry(HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)