diff --git a/Model.js b/Model.js index eab29f3..ca1364d 100644 --- a/Model.js +++ b/Model.js @@ -193,7 +193,9 @@ function summary(status) { parts.push("↓" + fmtMbps(live.downMbps) + " ↑" + fmtMbps(live.upMbps)) if (live.typicalDownMbps !== null && live.typicalDownMbps !== undefined) parts.push("typ ↓" + fmtMbps(live.typicalDownMbps)) - if (live.powerW !== null && live.powerW !== undefined) parts.push(fmtW(live.powerW)) + // 0 means the dish does not meter draw (see Panel.qml hasPower): leave it + // out of the tooltip rather than reporting a false 0.0 W. + if (live.powerW > 0) parts.push(fmtW(live.powerW)) var alerts = allAlertLabels(status) for (var i = 0; i < alerts.length; i++) parts.push("⚠ " + alerts[i]) var det = String(status.stateDetail || "") diff --git a/Panel.qml b/Panel.qml index 86193c3..742e831 100644 --- a/Panel.qml +++ b/Panel.qml @@ -164,9 +164,15 @@ Panel { return m } + // True only when the dish actually meters draw. Hardware that does not + // report power fills the ring with 0s (rev1 pre-production firmware does), + // which presence alone cannot tell apart from a real reading — so treat + // all-zero as "not reported" and hide the block instead of claiming 0.0 W + // beside an empty plot. A live idle draw is tens of watts, so a positive + // test can never hide a dish that does measure. readonly property bool hasPower: { var p = h ? h.powerW : [] - for (var i = 0; i < p.length; i++) if (p[i] !== null && p[i] !== undefined) return true + for (var i = 0; i < p.length; i++) if (p[i] > 0) return true return false } diff --git a/README.md b/README.md index 34ccffa..f511c1f 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ pick up dashboard changes — the shell caches QML until restart. - A Starlink dish reachable at `192.168.100.1` (default; any router setup that lets the Starlink app work also lets Dishy work) +- A dish that reports power draw (optional; the power block is hidden when + every sample is 0 W, since such hardware does not meter draw) - Omarchy's shell (Quickshell) — this is a `bar-widget` plugin - `systemd` user session for the backend service - `notify-send` for notifications (optional; already part of Omarchy)