Capability report: PUT /devices/{id}/report, a Capabilities section, offline devices degraded
A device reports its board, screen, camera and ports from its own credential (16 KB, schema 1, replacing the last report), and the flows are validated against it again. The node panel turns a reported port's config schema into a form, a reported screen is a canvas preset and a touch screen's first report turns Touch friendly on. An offline device node is degraded: amber on the canvas, a warning on Home, never a fault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138N7k5PT4dcR1iEqXaaQ9k
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a9d453c9d9
commit
ad76200d3d
@@ -31,7 +31,7 @@ def _never(**_: Any) -> None:
|
||||
|
||||
|
||||
class DeviceNode(Node):
|
||||
"""A device's ports, wired to messages. Down while the device is away."""
|
||||
"""A device's ports, wired to messages. Degraded while the device is away."""
|
||||
|
||||
passive = True
|
||||
|
||||
@@ -81,7 +81,9 @@ class DeviceNode(Node):
|
||||
presence.unwatch(self.cfg.device, self._presence)
|
||||
|
||||
def _presence(self, online: bool) -> None:
|
||||
# Degraded rather than down: a panel switched off or asleep is a thing
|
||||
# to notice, not a fault of the flow wiring it.
|
||||
if online:
|
||||
self.report_health("ok")
|
||||
else:
|
||||
self.report_health("down", "Offline")
|
||||
self.report_health("degraded", "Offline")
|
||||
|
||||
Reference in New Issue
Block a user