Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.switchbee.switch Namespace Reference

Classes

class  SwitchBeeSwitchEntity
 

Functions

None __init__ (self, _DeviceTypeT device, SwitchBeeCoordinator coordinator)
 
None _async_set_state (self, str state)
 
None _handle_coordinator_update (self)
 
None _update_from_coordinator (self)
 
None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 
None async_turn_off (self, **Any kwargs)
 
None async_turn_on (self, **Any kwargs)
 

Variables

 _attr_is_on
 

Detailed Description

Support for SwitchBee switch.

Function Documentation

◆ __init__()

None homeassistant.components.switchbee.switch.__init__ (   self,
_DeviceTypeT  device,
SwitchBeeCoordinator  coordinator 
)
Representation of a Switchbee switch.
Initialize the Switchbee switch.

Definition at line 56 of file switch.py.

◆ _async_set_state()

None homeassistant.components.switchbee.switch._async_set_state (   self,
str  state 
)
private

Definition at line 94 of file switch.py.

◆ _handle_coordinator_update()

None homeassistant.components.switchbee.switch._handle_coordinator_update (   self)
private
Handle updated data from the coordinator.

Definition at line 66 of file switch.py.

◆ _update_from_coordinator()

None homeassistant.components.switchbee.switch._update_from_coordinator (   self)
private
Update the entity attributes from the coordinator data.

Definition at line 71 of file switch.py.

◆ async_setup_entry()

None homeassistant.components.switchbee.switch.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up Switchbee switch.

Definition at line 27 of file switch.py.

◆ async_turn_off()

None homeassistant.components.switchbee.switch.async_turn_off (   self,
**Any  kwargs 
)
Async function to set off to switch.

Definition at line 90 of file switch.py.

◆ async_turn_on()

None homeassistant.components.switchbee.switch.async_turn_on (   self,
**Any  kwargs 
)
Async function to set on to switch.

Definition at line 86 of file switch.py.

Variable Documentation

◆ _attr_is_on

homeassistant.components.switchbee.switch._attr_is_on
private

Definition at line 63 of file switch.py.