ESPHome  2024.11.0
Public Member Functions | Protected Attributes
esphome::light::LightTraits Class Reference

This class is used to represent the capabilities of a light. More...

#include <light_traits.h>

Public Member Functions

 LightTraits ()=default
 
const std::set< ColorMode > & get_supported_color_modes () const
 
void set_supported_color_modes (std::set< ColorMode > supported_color_modes)
 
bool supports_color_mode (ColorMode color_mode) const
 
bool supports_color_capability (ColorCapability color_capability) const
 
 ESPDEPRECATED ("get_supports_brightness() is deprecated, use color modes instead.", "v1.21") bool get_supports_brightness() const
 
 ESPDEPRECATED ("get_supports_rgb() is deprecated, use color modes instead.", "v1.21") bool get_supports_rgb() const
 
 ESPDEPRECATED ("get_supports_rgb_white_value() is deprecated, use color modes instead.", "v1.21") bool get_supports_rgb_white_value() const
 
 ESPDEPRECATED ("get_supports_color_temperature() is deprecated, use color modes instead.", "v1.21") bool get_supports_color_temperature() const
 
 ESPDEPRECATED ("get_supports_color_interlock() is deprecated, use color modes instead.", "v1.21") bool get_supports_color_interlock() const
 
float get_min_mireds () const
 
void set_min_mireds (float min_mireds)
 
float get_max_mireds () const
 
void set_max_mireds (float max_mireds)
 

Protected Attributes

std::set< ColorModesupported_color_modes_ {}
 
float min_mireds_ {0}
 
float max_mireds_ {0}
 

Detailed Description

This class is used to represent the capabilities of a light.

Definition at line 11 of file light_traits.h.

Constructor & Destructor Documentation

◆ LightTraits()

esphome::light::LightTraits::LightTraits ( )
default

Member Function Documentation

◆ ESPDEPRECATED() [1/5]

esphome::light::LightTraits::ESPDEPRECATED ( "get_supports_brightness() is  deprecated,
use color modes instead."  ,
"v1.21"   
) const
inline

Definition at line 29 of file light_traits.h.

◆ ESPDEPRECATED() [2/5]

esphome::light::LightTraits::ESPDEPRECATED ( "get_supports_rgb() is  deprecated,
use color modes instead."  ,
"v1.21"   
) const
inline

Definition at line 31 of file light_traits.h.

◆ ESPDEPRECATED() [3/5]

esphome::light::LightTraits::ESPDEPRECATED ( "get_supports_rgb_white_value() is  deprecated,
use color modes instead."  ,
"v1.21"   
) const
inline

Definition at line 33 of file light_traits.h.

◆ ESPDEPRECATED() [4/5]

esphome::light::LightTraits::ESPDEPRECATED ( "get_supports_color_temperature() is  deprecated,
use color modes instead."  ,
"v1.21"   
) const
inline

Definition at line 38 of file light_traits.h.

◆ ESPDEPRECATED() [5/5]

esphome::light::LightTraits::ESPDEPRECATED ( "get_supports_color_interlock() is  deprecated,
use color modes instead."  ,
"v1.21"   
) const
inline

Definition at line 42 of file light_traits.h.

◆ get_max_mireds()

float esphome::light::LightTraits::get_max_mireds ( ) const
inline

Definition at line 51 of file light_traits.h.

◆ get_min_mireds()

float esphome::light::LightTraits::get_min_mireds ( ) const
inline

Definition at line 49 of file light_traits.h.

◆ get_supported_color_modes()

const std::set<ColorMode>& esphome::light::LightTraits::get_supported_color_modes ( ) const
inline

Definition at line 15 of file light_traits.h.

◆ set_max_mireds()

void esphome::light::LightTraits::set_max_mireds ( float  max_mireds)
inline

Definition at line 52 of file light_traits.h.

◆ set_min_mireds()

void esphome::light::LightTraits::set_min_mireds ( float  min_mireds)
inline

Definition at line 50 of file light_traits.h.

◆ set_supported_color_modes()

void esphome::light::LightTraits::set_supported_color_modes ( std::set< ColorMode supported_color_modes)
inline

Definition at line 16 of file light_traits.h.

◆ supports_color_capability()

bool esphome::light::LightTraits::supports_color_capability ( ColorCapability  color_capability) const
inline

Definition at line 21 of file light_traits.h.

◆ supports_color_mode()

bool esphome::light::LightTraits::supports_color_mode ( ColorMode  color_mode) const
inline

Definition at line 20 of file light_traits.h.

Field Documentation

◆ max_mireds_

float esphome::light::LightTraits::max_mireds_ {0}
protected

Definition at line 57 of file light_traits.h.

◆ min_mireds_

float esphome::light::LightTraits::min_mireds_ {0}
protected

Definition at line 56 of file light_traits.h.

◆ supported_color_modes_

std::set<ColorMode> esphome::light::LightTraits::supported_color_modes_ {}
protected

Definition at line 55 of file light_traits.h.


The documentation for this class was generated from the following file: