Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.switchbot Namespace Reference

Namespaces

 binary_sensor
 
 config_flow
 
 const
 
 coordinator
 
 cover
 
 entity
 
 humidifier
 
 light
 
 lock
 
 sensor
 
 switch
 

Functions

None _async_update_listener (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup_entry (HomeAssistant hass, SwitchbotConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
dictionary CLASS_BY_DEVICE
 
dictionary PLATFORMS_BY_TYPE
 

Detailed Description

Support for Switchbot devices.

Function Documentation

◆ _async_update_listener()

None homeassistant.components.switchbot._async_update_listener ( HomeAssistant  hass,
ConfigEntry  entry 
)
private
Handle options update.

Definition at line 161 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.switchbot.async_setup_entry ( HomeAssistant  hass,
SwitchbotConfigEntry  entry 
)
Set up Switchbot from a config entry.

Definition at line 82 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.switchbot.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 166 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.switchbot._LOGGER = logging.getLogger(__name__)
private

Definition at line 79 of file __init__.py.

◆ CLASS_BY_DEVICE

dictionary homeassistant.components.switchbot.CLASS_BY_DEVICE
Initial value:
1 = {
2  SupportedModels.CEILING_LIGHT.value: switchbot.SwitchbotCeilingLight,
3  SupportedModels.CURTAIN.value: switchbot.SwitchbotCurtain,
4  SupportedModels.BOT.value: switchbot.Switchbot,
5  SupportedModels.PLUG.value: switchbot.SwitchbotPlugMini,
6  SupportedModels.BULB.value: switchbot.SwitchbotBulb,
7  SupportedModels.LIGHT_STRIP.value: switchbot.SwitchbotLightStrip,
8  SupportedModels.HUMIDIFIER.value: switchbot.SwitchbotHumidifier,
9  SupportedModels.LOCK.value: switchbot.SwitchbotLock,
10  SupportedModels.LOCK_PRO.value: switchbot.SwitchbotLock,
11  SupportedModels.BLIND_TILT.value: switchbot.SwitchbotBlindTilt,
12 }

Definition at line 65 of file __init__.py.

◆ PLATFORMS_BY_TYPE

dictionary homeassistant.components.switchbot.PLATFORMS_BY_TYPE

Definition at line 32 of file __init__.py.