diff --git a/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/handler/HydrawiseControllerHandler.java b/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/handler/HydrawiseControllerHandler.java index 0bbd87d9ea9a1..5e3060ed75ccd 100644 --- a/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/handler/HydrawiseControllerHandler.java +++ b/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/handler/HydrawiseControllerHandler.java @@ -258,8 +258,7 @@ public void onData(List controllers) { // update values with what the cloud tells us even though the controller may be offline if (!controller.status.online) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, - String.format("Controller Offline: %s last seen %s", controller.status.summary, - secondsToDateTime(controller.status.lastContact.timestamp))); + "Service reports controller as offline"); } else if (getThing().getStatus() != ThingStatus.ONLINE) { updateStatus(ThingStatus.ONLINE); } @@ -277,7 +276,8 @@ private void updateController(Controller controller) { updateGroupState(CHANNEL_GROUP_CONTROLLER_SYSTEM, CHANNEL_CONTROLLER_SUMMARY, new StringType(controller.status.summary)); updateGroupState(CHANNEL_GROUP_CONTROLLER_SYSTEM, CHANNEL_CONTROLLER_LAST_CONTACT, - secondsToDateTime(controller.status.lastContact.timestamp)); + controller.status.lastContact != null ? secondsToDateTime(controller.status.lastContact.timestamp) + : UnDefType.NULL); } private void updateZones(List zones) {