Fix Global OFF not turning lights/segments off. (#11806)

Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
Matthew Skinner 2021-12-21 04:59:06 +11:00 committed by GitHub
parent 3a913a6e6b
commit dd951cee02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,8 +284,8 @@ public class WledApiV084 implements WledApi {
handler.update(CHANNEL_THIRD_WHITE, WLedHelper
.parseWhitePercent(state.stateResponse.seg[handler.config.segmentIndex].col[2].toString()));
}
if (!state.stateResponse.seg[handler.config.segmentIndex].on) {
// Global OFF or Segment OFF needs to be treated as OFF
if (!state.stateResponse.seg[handler.config.segmentIndex].on || !state.stateResponse.on) {
handler.update(CHANNEL_MASTER_CONTROLS, OnOffType.OFF);
handler.update(CHANNEL_SEGMENT_BRIGHTNESS, OnOffType.OFF);
} else {