Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.decora.light Namespace Reference

Classes

class  DecoraLight
 

Functions

def _DecoraLightT
 
def _name_validator (config)
 
None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 DEVICE_SCHEMA
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for Decora dimmers.

Function Documentation

◆ _DecoraLightT()

def homeassistant.components.decora.light._DecoraLightT
private

Definition at line 59 of file light.py.

◆ _name_validator()

def homeassistant.components.decora.light._name_validator (   config)
private
Validate the name.

Definition at line 35 of file light.py.

◆ setup_platform()

None homeassistant.components.decora.light.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up an Decora switch.

Definition at line 86 of file light.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.decora.light._LOGGER = logging.getLogger(__name__)
private

Definition at line 32 of file light.py.

◆ DEVICE_SCHEMA

homeassistant.components.decora.light.DEVICE_SCHEMA
Initial value:
1 = vol.Schema(
2  {vol.Optional(CONF_NAME): cv.string, vol.Required(CONF_API_KEY): cv.string}
3 )

Definition at line 45 of file light.py.

◆ PLATFORM_SCHEMA

homeassistant.components.decora.light.PLATFORM_SCHEMA
Initial value:
1 = vol.Schema(
2  vol.All(
3  LIGHT_PLATFORM_SCHEMA.extend(
4  {vol.Optional(CONF_DEVICES, default={}): {cv.string: DEVICE_SCHEMA}}
5  ),
6  _name_validator,
7  )
8 )

Definition at line 49 of file light.py.