mirror of https://github.com/arendst/Tasmota.git
Limit power after reinit
This commit is contained in:
parent
ac06abffe8
commit
50217485ec
|
@ -950,17 +950,21 @@ public:
|
|||
// only if non-multi channel
|
||||
// We apply dimmer in priority to RGB
|
||||
uint8_t bri = _state->DimmerToBri(Settings.light_dimmer);
|
||||
if (Settings.light_color[0] + Settings.light_color[1] + Settings.light_color[2] > 0) {
|
||||
|
||||
// The default values are #FFFFFFFFFF, in this case we avoid setting all channels
|
||||
// at the same time, see #6534
|
||||
if ( (DEFAULT_LIGHT_COMPONENT == Settings.light_color[0]) &&
|
||||
// at the same time, see #6534 and #8120
|
||||
if ((DEFAULT_LIGHT_COMPONENT == Settings.light_color[0]) &&
|
||||
(DEFAULT_LIGHT_COMPONENT == Settings.light_color[1]) &&
|
||||
(DEFAULT_LIGHT_COMPONENT == Settings.light_color[2]) &&
|
||||
(DEFAULT_LIGHT_COMPONENT == Settings.light_color[3]) &&
|
||||
(DEFAULT_LIGHT_COMPONENT == Settings.light_color[4]) &&
|
||||
(DEFAULT_LIGHT_DIMMER == Settings.light_dimmer) ) {
|
||||
_state->setBriCT(bri);
|
||||
_state->setBriRGB(bri);
|
||||
_state->setColorMode(LCM_RGB);
|
||||
}
|
||||
|
||||
if (Settings.light_color[0] + Settings.light_color[1] + Settings.light_color[2] > 0) {
|
||||
_state->setBriRGB(bri);
|
||||
} else {
|
||||
_state->setBriCT(bri);
|
||||
|
|
Loading…
Reference in New Issue