[homekit] handle NULL/UNDEF for temperature characteristics (#12172)
recent regression from handling QuantityType Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
parent
00da156b1b
commit
8794ff860e
@ -262,7 +262,7 @@ public class HomekitCharacteristicFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable Double stateAsTemperature(@Nullable State state) {
|
public static @Nullable Double stateAsTemperature(@Nullable State state) {
|
||||||
if (state == null) {
|
if (state == null || state instanceof UnDefType) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user