[insteon] Fix scene channels not responding after modem db reload (#18464)

Signed-off-by: Jeremy Setton <jeremy.setton@gmail.com>
This commit is contained in:
Jeremy
2025-03-30 10:26:05 +02:00
committed by GitHub
parent 98b659d531
commit 1ae51c7a97
2 changed files with 6 additions and 0 deletions
@@ -317,6 +317,11 @@ public abstract class InsteonBaseThingHandler extends BaseThingHandler implement
.forEach(this::channelLinked);
}
protected void unlinkChannels() {
getThing().getChannels().stream().map(Channel::getUID).filter(channelHandlers::containsKey)
.forEach(this::channelUnlinked);
}
@Override
public void refresh() {
InsteonModem modem = getModem();
@@ -131,6 +131,7 @@ public class InsteonSceneHandler extends InsteonBaseThingHandler {
if (scene != null) {
scene.setModem(null);
}
unlinkChannels();
}
@Override