Light Entity

A light entity controls the brightness, hue and saturation color value, white value, color temperature and effects of a light source. Derive platform entities from homeassistant.components.light.LightEntity.


brightnessintNoneReturn the brightness of this light between 0..255
color_tempintNoneReturn the CT color value in mireds.
effectStringNoneReturn the current effect.
effect_listlistNoneReturn the list of supported effects.
hs_colorlistNoneReturn the hue and saturation color value [float, float].
is_onboolboolReturns if the light entity is on or not.
max_miredsintintReturn the warmest color_temp that this light supports.
min_miredsintintReturn the coldest color_temp that this light supports.
supported_featuresintintFlag supported features.
white_valueintNoneReturn the white value of this light between 0..255.

Support Feature

SUPPORT_BRIGHTNESSControls the brightness of a light source
SUPPORT_COLORControls the color a light source shows
SUPPORT_COLOR_TEMPControls the representation a light source shows based on temperature
SUPPORT_EFFECTControls the effect a light source shows
SUPPORT_FLASHControls the duration of a flash a light source shows
SUPPORT_TRANSITIONControls the duration of transitions between color and effects
SUPPORT_WHITE_VALUEControls the white light a light source shows.


Turn on Light Device

class MyLightEntity(LightEntity):
def turn_on(self, **kwargs):
"""Turn the device on."""
async def async_turn_on(self, **kwargs):
"""Turn device on."""

Turn Off Light Device

class MyLightEntity(LightEntity):
def turn_off(self, **kwargs):
"""Turn the device off."""
async def async_turn_off(self, **kwargs):
"""Turn device off."""
Last updated on