Skip to content

Commit

Permalink
[openwebnet] update state in OpenWebNetLightingGroupHandler.handleMes…
Browse files Browse the repository at this point in the history
…sage

Signed-off-by: Massimo Valla <[email protected]>
  • Loading branch information
mvalla committed Nov 19, 2023
1 parent ee9244b commit c326fe5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ protected void handlePropagatedMessage(Lighting lmsg, @Nullable String oId) {
protected void handleMessage(BaseOpenMessage msg) {
logger.debug("handleMessage({}) for thing: {}", msg, thing.getUID());
super.handleMessage(msg);

WhereLightAutom w = (WhereLightAutom) deviceWhere;
if (w != null && w.isGroup()) {
if (((Lighting) msg).isOff()) {
updateState(CHANNEL_SWITCH, OnOffType.OFF);
} else {
updateState(CHANNEL_SWITCH, OnOffType.ON);
}
}
}

/*
Expand Down

0 comments on commit c326fe5

Please sign in to comment.