Skip to content

Commit 81ecb5c

Browse files
committed
exclude characteristic description for well-known types
they're optional, and they just take up extra data
1 parent 17f87f1 commit 81ecb5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/github/hapjava/characteristics/impl/base/BaseCharacteristic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ protected CompletableFuture<JsonObjectBuilder> makeBuilder(int instanceId) {
112112
.add("iid", instanceId)
113113
.add("type", shortType)
114114
.add("perms", perms.build())
115-
.add("format", format)
116-
.add("description", description);
115+
.add("format", format);
116+
if (shortType.length() == type.length()) builder.add("description", description);
117117
if (isReadable) setJsonValue(builder, value);
118118
return builder;
119119
});

0 commit comments

Comments
 (0)