Skip to content

Commit 1b35063

Browse files
author
Christophe Dirac
committed
Don't write a null value to serialized characteristics, HomeKit cannot
handle that.
1 parent ea6be83 commit 1b35063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/beowulfe/hap/characteristics/BaseCharacteristic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected void setJsonValue(JsonObjectBuilder builder, T value) {
172172
} else if (value instanceof BigDecimal){
173173
builder.add("value", (BigDecimal) value);
174174
} else if (value == null) {
175-
builder.addNull("value");
175+
// Do not add null value, HomeKit cannot handle that
176176
} else {
177177
builder.add("value", value.toString());
178178
}

0 commit comments

Comments
 (0)