From: Cody Cutrer Date: Sun, 30 Jan 2022 17:46:56 +0000 (-0700) Subject: [homekit] handle NULL/UNDEF for temperature characteristics (#12172) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=8794ff860ef4ebb76b09c0a88ac349f85fe8c51b;p=openhab-addons.git [homekit] handle NULL/UNDEF for temperature characteristics (#12172) recent regression from handling QuantityType Signed-off-by: Cody Cutrer --- diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java index a7a9de2aad..4367611823 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java @@ -262,7 +262,7 @@ public class HomekitCharacteristicFactory { } public static @Nullable Double stateAsTemperature(@Nullable State state) { - if (state == null) { + if (state == null || state instanceof UnDefType) { return null; }