ESPHome  2024.12.2
Data Structures | Typedefs | Enumerations | Functions
esphome::light Namespace Reference

Data Structures

class  AddressableColorWipeEffect
 
struct  AddressableColorWipeEffectColor
 
class  AddressableFireworksEffect
 
class  AddressableFlickerEffect
 
class  AddressableLambdaLightEffect
 
class  AddressableLight
 
class  AddressableLightEffect
 
class  AddressableLightState
 Use a custom state class for addressable lights, to allow type system to discriminate between addressable and non-addressable lights. More...
 
class  AddressableLightTransformer
 
class  AddressableLightWrapper
 
class  AddressableRainbowLightEffect
 
class  AddressableRandomTwinkleEffect
 
class  AddressableScanEffect
 
class  AddressableSet
 
class  AddressableTwinkleEffect
 
class  AutomationLightEffect
 
class  ColorCapabilityHelper
 Helper class to allow bitwise operations on ColorCapability. More...
 
class  ColorModeHelper
 Helper class to allow bitwise operations on ColorMode with ColorCapability. More...
 
class  DimRelativeAction
 
class  ESPColorCorrection
 
class  ESPColorSettable
 
class  ESPColorView
 
struct  ESPHSVColor
 
class  ESPRangeIterator
 
class  ESPRangeView
 A half-open range of LEDs, inclusive of the begin index and exclusive of the end index, using zero-based numbering. More...
 
class  FlickerLightEffect
 
class  LambdaLightEffect
 
class  LightCall
 This class represents a requested change in a light state. More...
 
class  LightColorValues
 This class represents the color state for a light object. More...
 
class  LightControlAction
 
class  LightEffect
 
class  LightFlashTransformer
 
class  LightIsOffCondition
 
class  LightIsOnCondition
 
class  LightJSONSchema
 
class  LightOutput
 Interface to write LightStates to hardware. More...
 
class  LightState
 This class represents the communication layer between the front-end MQTT layer and the hardware output layer. More...
 
struct  LightStateRTCState
 
class  LightStateTrigger
 
class  LightTraits
 This class is used to represent the capabilities of a light. More...
 
class  LightTransformer
 Base class for all light color transformers, such as transitions or flashes. More...
 
class  LightTransitionTransformer
 
class  LightTurnOffTrigger
 
class  LightTurnOnTrigger
 
class  PulseLightEffect
 Pulse effect. More...
 
class  RandomLightEffect
 Random effect. Sets random colors every 10 seconds and slowly transitions between them. More...
 
class  StrobeLightEffect
 
struct  StrobeLightEffectColor
 
class  ToggleAction
 

Typedefs

using v1 = Color
 

Enumerations

enum  LimitMode { LimitMode::CLAMP, LimitMode::DO_NOTHING }
 
enum  ColorCapability : uint8_t {
  ColorCapability::ON_OFF = 1 << 0, ColorCapability::BRIGHTNESS = 1 << 1, ColorCapability::WHITE = 1 << 2, ColorCapability::COLOR_TEMPERATURE = 1 << 3,
  ColorCapability::COLD_WARM_WHITE = 1 << 4, ColorCapability::RGB = 1 << 5
}
 Color capabilities are the various outputs that a light has and that can be independently controlled by the user. More...
 
enum  ColorMode : uint8_t {
  ColorMode::UNKNOWN = 0, ColorMode::ON_OFF = (uint8_t) ColorCapability::ON_OFF, ColorMode::BRIGHTNESS = (uint8_t) (ColorCapability::ON_OFF | ColorCapability::BRIGHTNESS), ColorMode::WHITE = (uint8_t) (ColorCapability::ON_OFF | ColorCapability::BRIGHTNESS | ColorCapability::WHITE),
  ColorMode::COLOR_TEMPERATURE, ColorMode::COLD_WARM_WHITE, ColorMode::RGB = (uint8_t) (ColorCapability::ON_OFF | ColorCapability::BRIGHTNESS | ColorCapability::RGB), ColorMode::RGB_WHITE,
  ColorMode::RGB_COLOR_TEMPERATURE, ColorMode::RGB_COLD_WARM_WHITE
}
 Color modes are a combination of color capabilities that can be used at the same time. More...
 
enum  LightRestoreMode {
  LIGHT_RESTORE_DEFAULT_OFF, LIGHT_RESTORE_DEFAULT_ON, LIGHT_ALWAYS_OFF, LIGHT_ALWAYS_ON,
  LIGHT_RESTORE_INVERTED_DEFAULT_OFF, LIGHT_RESTORE_INVERTED_DEFAULT_ON, LIGHT_RESTORE_AND_OFF, LIGHT_RESTORE_AND_ON
}
 

Functions

Color color_from_light_color_values (LightColorValues val)
 Convert the color information from a LightColorValues object to a Color object (does not apply brightness). More...
 
void addressableset_warn_about_scale (const char *field)
 
constexpr ColorCapabilityHelper operator & (ColorCapability lhs, ColorCapability rhs)
 
constexpr ColorCapabilityHelper operator & (ColorCapabilityHelper lhs, ColorCapability rhs)
 
constexpr ColorCapabilityHelper operator| (ColorCapability lhs, ColorCapability rhs)
 
constexpr ColorCapabilityHelper operator| (ColorCapabilityHelper lhs, ColorCapability rhs)
 
constexpr ColorModeHelper operator & (ColorMode lhs, ColorMode rhs)
 
constexpr ColorModeHelper operator & (ColorMode lhs, ColorCapability rhs)
 
constexpr ColorModeHelper operator & (ColorModeHelper lhs, ColorMode rhs)
 
constexpr ColorModeHelper operator| (ColorMode lhs, ColorMode rhs)
 
constexpr ColorModeHelper operator| (ColorMode lhs, ColorCapability rhs)
 
constexpr ColorModeHelper operator| (ColorModeHelper lhs, ColorMode rhs)
 
int32_t HOT interpret_index (int32_t index, int32_t size)
 

Typedef Documentation

◆ v1

using esphome::light::v1 = typedef Color

Definition at line 20 of file addressable_light.h.

Enumeration Type Documentation

◆ ColorCapability

enum esphome::light::ColorCapability : uint8_t
strong

Color capabilities are the various outputs that a light has and that can be independently controlled by the user.

Enumerator
ON_OFF 

Light can be turned on/off.

BRIGHTNESS 

Master brightness of the light can be controlled.

WHITE 

Brightness of white channel can be controlled separately from other channels.

COLOR_TEMPERATURE 

Color temperature can be controlled.

COLD_WARM_WHITE 

Brightness of cold and warm white output can be controlled.

RGB 

Color can be controlled using RGB format (includes a brightness control for the color).

Definition at line 9 of file color_mode.h.

◆ ColorMode

enum esphome::light::ColorMode : uint8_t
strong

Color modes are a combination of color capabilities that can be used at the same time.

Enumerator
UNKNOWN 

No color mode configured (cannot be a supported mode, only active when light is off).

ON_OFF 

Only on/off control.

BRIGHTNESS 

Dimmable light.

WHITE 

White output only (use only if the light also has another color mode such as RGB).

COLOR_TEMPERATURE 

Controllable color temperature output.

COLD_WARM_WHITE 

Cold and warm white output with individually controllable brightness.

RGB 

RGB color output.

RGB_WHITE 

RGB color output and a separate white output.

RGB_COLOR_TEMPERATURE 

RGB color output and a separate white output with controllable color temperature.

RGB_COLD_WARM_WHITE 

RGB color output, and separate cold and warm white outputs.

Definition at line 49 of file color_mode.h.

◆ LightRestoreMode

Enumerator
LIGHT_RESTORE_DEFAULT_OFF 
LIGHT_RESTORE_DEFAULT_ON 
LIGHT_ALWAYS_OFF 
LIGHT_ALWAYS_ON 
LIGHT_RESTORE_INVERTED_DEFAULT_OFF 
LIGHT_RESTORE_INVERTED_DEFAULT_ON 
LIGHT_RESTORE_AND_OFF 
LIGHT_RESTORE_AND_ON 

Definition at line 20 of file light_state.h.

◆ LimitMode

Enumerator
CLAMP 
DO_NOTHING 

Definition at line 10 of file automation.h.

Function Documentation

◆ addressableset_warn_about_scale()

void esphome::light::addressableset_warn_about_scale ( const char *  field)

Definition at line 9 of file automation.cpp.

◆ color_from_light_color_values()

Color esphome::light::color_from_light_color_values ( LightColorValues  val)

Convert the color information from a LightColorValues object to a Color object (does not apply brightness).

Definition at line 30 of file addressable_light.cpp.

◆ interpret_index()

int32_t esphome::light::interpret_index ( int32_t  index,
int32_t  size 
)

Definition at line 7 of file esp_range_view.cpp.

◆ operator &() [1/5]

constexpr ColorCapabilityHelper esphome::light::operator& ( ColorCapability  lhs,
ColorCapability  rhs 
)

Definition at line 35 of file color_mode.h.

◆ operator &() [2/5]

constexpr ColorCapabilityHelper esphome::light::operator& ( ColorCapabilityHelper  lhs,
ColorCapability  rhs 
)

Definition at line 38 of file color_mode.h.

◆ operator &() [3/5]

constexpr ColorModeHelper esphome::light::operator& ( ColorMode  lhs,
ColorMode  rhs 
)

Definition at line 88 of file color_mode.h.

◆ operator &() [4/5]

constexpr ColorModeHelper esphome::light::operator& ( ColorMode  lhs,
ColorCapability  rhs 
)

Definition at line 91 of file color_mode.h.

◆ operator &() [5/5]

constexpr ColorModeHelper esphome::light::operator& ( ColorModeHelper  lhs,
ColorMode  rhs 
)

Definition at line 94 of file color_mode.h.

◆ operator|() [1/5]

constexpr ColorCapabilityHelper esphome::light::operator| ( ColorCapability  lhs,
ColorCapability  rhs 
)

Definition at line 41 of file color_mode.h.

◆ operator|() [2/5]

constexpr ColorCapabilityHelper esphome::light::operator| ( ColorCapabilityHelper  lhs,
ColorCapability  rhs 
)

Definition at line 44 of file color_mode.h.

◆ operator|() [3/5]

constexpr ColorModeHelper esphome::light::operator| ( ColorMode  lhs,
ColorMode  rhs 
)

Definition at line 97 of file color_mode.h.

◆ operator|() [4/5]

constexpr ColorModeHelper esphome::light::operator| ( ColorMode  lhs,
ColorCapability  rhs 
)

Definition at line 100 of file color_mode.h.

◆ operator|() [5/5]

constexpr ColorModeHelper esphome::light::operator| ( ColorModeHelper  lhs,
ColorMode  rhs 
)

Definition at line 103 of file color_mode.h.