Skip to content

Commit

Permalink
Fix Global OFF not turning lights/segments off. (openhab#11806)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
  • Loading branch information
Skinah authored and mischmidt83 committed Jan 9, 2022
1 parent 89db79c commit 1046f15
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ protected void processState() throws ApiException {
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 {
Expand Down

0 comments on commit 1046f15

Please sign in to comment.