A panel writes only what its dashboards' inputs target

It still reads every message its dashboards show. A message a tile only
draws, or a setting is bound to, is no longer writable from the panel.
This commit is contained in:
2026-10-15 10:10:44 +02:00
parent e85b18092f
commit eca3fa0049
4 changed files with 39 additions and 18 deletions
+10
View File
@@ -197,6 +197,16 @@ def requests_of(defn: DashboardDef) -> set[str]:
return {w.target for w in defn.widgets if w.type == "chart" and w.target}
def targets_of(defn: DashboardDef) -> set[str]:
"""The messages this dashboard's inputs publish to.
What a screen showing it may write, a narrower set than what it may read.
A tile that only draws a message, and a setting bound to one, are there to
be looked at, so a panel showing them is not entitled to set them.
"""
return {w.target for w in defn.widgets if w.target}
def io_in(panel_id: str) -> set[str]:
"""The messages this panel's own hardware publishes to."""
panel = find(panel_id)