ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
m5stack_8angle
light
m5stack_8angle_light.cpp
Go to the documentation of this file.
1
#include "
m5stack_8angle_light.h
"
2
3
#include "
esphome/core/log.h
"
4
5
namespace
esphome::m5stack_8angle
{
6
7
ESPHOME_LOG_TAG
(TAG,
"m5stack_8angle.light"
);
8
9
void
M5Stack8AngleLightOutput::write_state
(
light::LightState
*
state
) {
10
for
(
int
i = 0; i < M5STACK_8ANGLE_NUM_LEDS;
11
i++) {
// write one LED at a time, otherwise the message will be truncated
12
this->
parent_
->write_register(M5STACK_8ANGLE_REGISTER_RGB_24B + i * M5STACK_8ANGLE_BYTES_PER_LED,
13
this->
internal_accessor_
.
color_data
+ i * M5STACK_8ANGLE_BYTES_PER_LED,
14
M5STACK_8ANGLE_BYTES_PER_LED);
15
}
16
}
17
18
}
// namespace esphome::m5stack_8angle
esphome::Parented< M5Stack8AngleComponent >::parent_
M5Stack8AngleComponent * parent_
Definition
helpers.h:2171
esphome::light::BufferColorAccessor::color_data
uint8_t * color_data
Definition
esp_color_view.h:102
esphome::light::LightState
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition
light_state.h:68
esphome::m5stack_8angle::M5Stack8AngleLightOutput::internal_accessor_
light::CorrectedBufferColorAccessor internal_accessor_
Definition
m5stack_8angle_light.h:36
esphome::m5stack_8angle::M5Stack8AngleLightOutput::write_state
void write_state(light::LightState *state) override
Definition
m5stack_8angle_light.cpp:9
state
bool state
Definition
fan.h:2
log.h
m5stack_8angle_light.h
esphome::m5stack_8angle
Definition
m5stack_8angle_binary_sensor.cpp:3
esphome::m5stack_8angle::ESPHOME_LOG_TAG
ESPHOME_LOG_TAG(TAG, "m5stack_8angle.light")
Generated by
1.12.0