Keep GPIO command scopes and cover room text limits and existing UI dispatch

This commit is contained in:
mikecarper committed 2026-09-30 03:54:27 -07:00
1 parent 465425c37a
commit b2bbb92287
8 files changed
+15 -13

No files matched your search

+3
View File
@@ -22,6 +22,9 @@ const vip = {...builder.EXAMPLES.vip, id: "01".repeat(32), remote: "on"};
assert.ok(builder.commands(vip).includes("set notify.remote contact:" + vip.id + " on"));
const room = {...vip, kind: "room"};
assert.ok(builder.commands(room).includes("set notify.remote room:" + room.id + " on"));
const longPost = {...vip, led: Array(9).fill("60000").join(","), repeat: "65535"};
assert.equal(builder.notificationText(longPost).length, 151);
assert.throws(() => builder.notificationText({...longPost, kind: "room"}), /150 characters for a room post/);
assert.throws(() => builder.commands({...builder.EXAMPLES.food, remote: "on"}));
assert.throws(() => builder.commands({...vip, id: "1234"}));
const encoded = builder.encodeCommand("notify.stop", "A7");