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

Classes

class  ColorModeAttr
 

Functions

None _async_reproduce_state (HomeAssistant hass, State state, *Context|None context=None, dict[str, Any]|None reproduce_options=None)
 
bool _color_mode_same (State cur_state, State state)
 
None async_reproduce_states (HomeAssistant hass, Iterable[State] states, *Context|None context=None, dict[str, Any]|None reproduce_options=None)
 
bool check_attr_equal (Mapping attr1, Mapping attr2, str attr_str)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
list ATTR_GROUP = [ATTR_BRIGHTNESS, ATTR_EFFECT]
 
list COLOR_GROUP
 
dictionary COLOR_MODE_TO_ATTRIBUTE
 
dictionary VALID_STATES = {STATE_ON, STATE_OFF}
 

Detailed Description

Reproduce an Light state.

Function Documentation

◆ _async_reproduce_state()

None homeassistant.components.light.reproduce_state._async_reproduce_state ( HomeAssistant  hass,
State  state,
*Context | None   context = None,
dict[str, Any] | None   reproduce_options = None 
)
private
Reproduce a single state.

Definition at line 80 of file reproduce_state.py.

◆ _color_mode_same()

bool homeassistant.components.light.reproduce_state._color_mode_same ( State  cur_state,
State  state 
)
private
Test if color_mode is same.

Definition at line 69 of file reproduce_state.py.

◆ async_reproduce_states()

None homeassistant.components.light.reproduce_state.async_reproduce_states ( HomeAssistant  hass,
Iterable[State states,
*Context | None   context = None,
dict[str, Any] | None   reproduce_options = None 
)
Reproduce Light states.

Definition at line 151 of file reproduce_state.py.

◆ check_attr_equal()

bool homeassistant.components.light.reproduce_state.check_attr_equal ( Mapping  attr1,
Mapping  attr2,
str  attr_str 
)
Return true if the given attributes are equal.

Definition at line 169 of file reproduce_state.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 35 of file reproduce_state.py.

◆ ATTR_GROUP

list homeassistant.components.light.reproduce_state.ATTR_GROUP = [ATTR_BRIGHTNESS, ATTR_EFFECT]

Definition at line 39 of file reproduce_state.py.

◆ COLOR_GROUP

list homeassistant.components.light.reproduce_state.COLOR_GROUP
Initial value:
1 = [
2  ATTR_HS_COLOR,
3  ATTR_COLOR_TEMP,
4  ATTR_RGB_COLOR,
5  ATTR_RGBW_COLOR,
6  ATTR_RGBWW_COLOR,
7  ATTR_XY_COLOR,
8 ]

Definition at line 41 of file reproduce_state.py.

◆ COLOR_MODE_TO_ATTRIBUTE

dictionary homeassistant.components.light.reproduce_state.COLOR_MODE_TO_ATTRIBUTE
Initial value:
1 = {
2  ColorMode.COLOR_TEMP: ColorModeAttr(ATTR_COLOR_TEMP, ATTR_COLOR_TEMP),
3  ColorMode.HS: ColorModeAttr(ATTR_HS_COLOR, ATTR_HS_COLOR),
4  ColorMode.RGB: ColorModeAttr(ATTR_RGB_COLOR, ATTR_RGB_COLOR),
5  ColorMode.RGBW: ColorModeAttr(ATTR_RGBW_COLOR, ATTR_RGBW_COLOR),
6  ColorMode.RGBWW: ColorModeAttr(ATTR_RGBWW_COLOR, ATTR_RGBWW_COLOR),
7  ColorMode.WHITE: ColorModeAttr(ATTR_WHITE, ATTR_BRIGHTNESS),
8  ColorMode.XY: ColorModeAttr(ATTR_XY_COLOR, ATTR_XY_COLOR),
9 }

Definition at line 58 of file reproduce_state.py.

◆ VALID_STATES

dictionary homeassistant.components.light.reproduce_state.VALID_STATES = {STATE_ON, STATE_OFF}

Definition at line 37 of file reproduce_state.py.