Skip to content

Commit 0098f88

Browse files
committed
tools: cloud: kv_state show write-only properly
Fix the display of `infuse cloud kv_state` for write-only values. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 09eff10 commit 0098f88

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/infuse_iot/tools/cloud.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,10 @@ def kv_state(self, client: Client):
276276
continue
277277

278278
if isinstance(element.data, Unset):
279-
table.append((key, "Not set"))
279+
if element.crc:
280+
table.append((key, f"Write-only (CRC: 0x{element.crc:08x})"))
281+
else:
282+
table.append((key, "Not set"))
280283
else:
281284
if isinstance(element.decoded, Unset):
282285
table.append((key, element.data))

0 commit comments

Comments
 (0)