mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-07 05:13:31 +02:00
Support inverting color temperature on tuya lights (#2277)
This commit is contained in:
@@ -17,6 +17,9 @@ class TuyaLight : public Component, public light::LightOutput {
|
||||
}
|
||||
void set_switch_id(uint8_t switch_id) { this->switch_id_ = switch_id; }
|
||||
void set_color_temperature_id(uint8_t color_temperature_id) { this->color_temperature_id_ = color_temperature_id; }
|
||||
void set_color_temperature_invert(bool color_temperature_invert) {
|
||||
this->color_temperature_invert_ = color_temperature_invert;
|
||||
}
|
||||
void set_tuya_parent(Tuya *parent) { this->parent_ = parent; }
|
||||
void set_min_value(uint32_t min_value) { min_value_ = min_value; }
|
||||
void set_max_value(uint32_t max_value) { max_value_ = max_value; }
|
||||
@@ -47,6 +50,7 @@ class TuyaLight : public Component, public light::LightOutput {
|
||||
uint32_t color_temperature_max_value_ = 255;
|
||||
float cold_white_temperature_;
|
||||
float warm_white_temperature_;
|
||||
bool color_temperature_invert_{false};
|
||||
light::LightState *state_{nullptr};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user