mirror of
https://github.com/esphome/esphome.git
synced 2025-08-06 18:37:47 +00:00
tidy
This commit is contained in:
parent
82fd62e9dd
commit
6dbdeeb59b
@ -215,10 +215,11 @@ class LightCall {
|
|||||||
|
|
||||||
// Helper to set flag
|
// Helper to set flag
|
||||||
void set_flag_(FieldFlags flag, bool value) {
|
void set_flag_(FieldFlags flag, bool value) {
|
||||||
if (value)
|
if (value) {
|
||||||
this->flags_ |= flag;
|
this->flags_ |= flag;
|
||||||
else
|
} else {
|
||||||
this->flags_ &= ~flag;
|
this->flags_ &= ~flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LightState *parent_;
|
LightState *parent_;
|
||||||
|
@ -46,8 +46,7 @@ class LightColorValues {
|
|||||||
public:
|
public:
|
||||||
/// Construct the LightColorValues with all attributes enabled, but state set to off.
|
/// Construct the LightColorValues with all attributes enabled, but state set to off.
|
||||||
LightColorValues()
|
LightColorValues()
|
||||||
: color_mode_(ColorMode::UNKNOWN),
|
: state_(0.0f),
|
||||||
state_(0.0f),
|
|
||||||
brightness_(1.0f),
|
brightness_(1.0f),
|
||||||
color_brightness_(1.0f),
|
color_brightness_(1.0f),
|
||||||
red_(1.0f),
|
red_(1.0f),
|
||||||
@ -56,7 +55,8 @@ class LightColorValues {
|
|||||||
white_(1.0f),
|
white_(1.0f),
|
||||||
color_temperature_{0.0f},
|
color_temperature_{0.0f},
|
||||||
cold_white_{1.0f},
|
cold_white_{1.0f},
|
||||||
warm_white_{1.0f} {}
|
warm_white_{1.0f},
|
||||||
|
color_mode_(ColorMode::UNKNOWN) {}
|
||||||
|
|
||||||
LightColorValues(ColorMode color_mode, float state, float brightness, float color_brightness, float red, float green,
|
LightColorValues(ColorMode color_mode, float state, float brightness, float color_brightness, float red, float green,
|
||||||
float blue, float white, float color_temperature, float cold_white, float warm_white) {
|
float blue, float white, float color_temperature, float cold_white, float warm_white) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user