Fix unreachable lights and sensors being marked as GONE. (#12245)

Fixes #12244

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2022-02-09 20:26:57 +01:00 committed by GitHub
parent fdf8ebec98
commit b23254fc3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -464,7 +464,7 @@ public class LightThingHandler extends DeconzBaseThingHandler {
updateStatus(ThingStatus.ONLINE);
thing.getChannels().stream().map(c -> c.getUID().getId()).forEach(c -> valueUpdated(c, lightState));
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.GONE, "Not reachable");
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, "@text/offline.light-not-reachable");
thing.getChannels().stream().map(c -> c.getUID()).forEach(c -> updateState(c, UnDefType.UNDEF));
}
}

View File

@ -116,7 +116,7 @@ public abstract class SensorBaseThingHandler extends DeconzBaseThingHandler {
// Add some information about the sensor
if (!sensorConfig.reachable) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.GONE, "Not reachable");
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, "@text/offline.sensor-not-reachable");
return;
}

View File

@ -196,3 +196,8 @@ channel-type.deconz.voltage.label = Voltage
channel-type.deconz.voltage.description = Current voltage
channel-type.deconz.waterleakage.label = Water Leakage
channel-type.deconz.waterleakage.description = Water leakage detected
# thing status descriptions
offline.light-not-reachable = Not reachable
offline.sensor-not-reachable = Not reachable