[powermax] Ignore disabled things (#12684)
* [powermax] Ignore disabled things Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
4180eac57c
commit
bfca6d2201
|
@ -49,6 +49,7 @@ import org.openhab.core.thing.Thing;
|
||||||
import org.openhab.core.thing.ThingStatus;
|
import org.openhab.core.thing.ThingStatus;
|
||||||
import org.openhab.core.thing.ThingStatusDetail;
|
import org.openhab.core.thing.ThingStatusDetail;
|
||||||
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
||||||
|
import org.openhab.core.thing.binding.ThingHandler;
|
||||||
import org.openhab.core.thing.binding.ThingHandlerService;
|
import org.openhab.core.thing.binding.ThingHandlerService;
|
||||||
import org.openhab.core.types.Command;
|
import org.openhab.core.types.Command;
|
||||||
import org.openhab.core.types.RefreshType;
|
import org.openhab.core.types.RefreshType;
|
||||||
|
@ -623,9 +624,12 @@ public class PowermaxBridgeHandler extends BaseBridgeHandler implements Powermax
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Thing thing : getThing().getThings()) {
|
for (Thing thing : getThing().getThings()) {
|
||||||
if (thing.getHandler() != null) {
|
if (!thing.isEnabled()) {
|
||||||
PowermaxThingHandler handler = (PowermaxThingHandler) thing.getHandler();
|
continue;
|
||||||
if (handler != null) {
|
}
|
||||||
|
ThingHandler thingHandler = thing.getHandler();
|
||||||
|
if (thingHandler instanceof PowermaxThingHandler) {
|
||||||
|
PowermaxThingHandler handler = (PowermaxThingHandler) thingHandler;
|
||||||
if (thing.getThingTypeUID().equals(THING_TYPE_ZONE)) {
|
if (thing.getThingTypeUID().equals(THING_TYPE_ZONE)) {
|
||||||
// All of the zone state objects will have the same list of values.
|
// All of the zone state objects will have the same list of values.
|
||||||
// The use of getZone(1) here is just to get any PowermaxZoneState
|
// The use of getZone(1) here is just to get any PowermaxZoneState
|
||||||
|
@ -645,7 +649,6 @@ public class PowermaxBridgeHandler extends BaseBridgeHandler implements Powermax
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update all channels to an UNDEF state to indicate that communication with the panel is offline
|
* Update all channels to an UNDEF state to indicate that communication with the panel is offline
|
||||||
|
|
Loading…
Reference in New Issue