Skip to content

r202639: space-less circuits outside the grid - #24

Merged
cayossarian merged 6 commits into
prerelease/0.10from
feat/meters-strip
Oct 9, 2026
Merged

cayossarian merged 6 commits into
prerelease/0.10from
feat/meters-strip

Conversation

@cayossarian

Copy link
Copy Markdown
Member

r202639: a topology row marked outside_panel is a meter without a breaker space. It is drawn outside the grid.

  • It is never a grid slot. It does not widen the drawn position range or the size derived from the circuits, even if its row names a tab.
  • A Meters strip above the grid shows each such meter's name and its power in the import-positive sign, with the direction it states ("importing" or "exporting"). In amps mode it shows current, as the grid does. It also shows the energy the meter has imported and exported.
  • The strip draws no toggle, rating or gear, and it updates in place. It is hidden with the panel (show_panel: false), as the grid is, and the card's size counts it when it is drawn.
  • An unknown power shows "--" and states no direction. In amps mode an unknown current shows "--", while the direction still follows power. An unknown energy shows "--".
  • The Site stat's fallback sum leaves such a meter out.
  • In the list views it is never drawn, sorted or dimmed as off, its expanded chart included, and it gets no on/off control.
  • New i18n keys meters.title, meters.importing, meters.exporting, meters.imported, meters.exported in every language.

Known limitation. The panel_topology command is admin-only, so a non-admin user's card discovers circuits from the entity registry instead. That path cannot tell a meter from a circuit, and it leaves meters out: they are not drawn, summed or placed in the grid. The meters remain Home Assistant entities.

Stacked on #23.

dist/ is not rebuilt here; the release rebuilds it.

Checks

  • npm test: 616 passed in 58 files (592 in 57 before)
  • npm run typecheck, npm run lint, node scripts/validate-i18n.mjs: clean
  • npm run build: clean
  • pre-commit hooks (prettier, eslint, typecheck, i18n) passed on every commit

A panel that does not know its size reports 0, which the card took as the
size and then refused to load. A size of 0, below zero, fractional or not a
number is now treated as absent, and the size comes from the circuits.

Part of the spanos3/r202639/03 batch 2 work.
Topology may report the panel's first and last breaker positions. The grid
draws rows over that range, labelled with the positions' own numbers, instead
of 1 to the panel size, so a breaker above the size is drawn and no empty
slot appears below the first position. A panel that reports size 0 with its
positions loads. Without reported positions the range is 1 to the size, as
before, and it always widens to every occupied tab.

Part of the spanos3/r202639/03 batch 2 work.
…e grid

A topology row marked outside_panel is a meter with no breaker space and no
relay. It is never a grid slot: it is drawn in a Meters strip above the grid
with its name, its power in the import-positive sign with the direction it
states (importing or exporting), and the energy it has imported and
exported, with no toggle, rating or gear. An unknown reading shows "--" and
states no direction.

Such a meter is no load on the panel, so the Site stat's fallback sum leaves
it out. In the list views it is never drawn or sorted as off, and it gets no
on/off control.

Part of the spanos3/r202639/03 batch 2 work.
The list's expanded chart drew a meter outside the panel as on, but the
live update re-read its relay, which a meter does not have, and dimmed the
chart as off. The update now reads the same on-state the list draws.

Part of the spanos3/r202639/03 batch 2 work.
…el size

A meter outside the panel occupies no breaker space, so a tab its row might
name no longer widens the drawn position range or sets the size derived
from the circuits. The predicate moves beside the layout helpers that now
read it.

Part of the spanos3/r202639/03 batch 2 work.
…strip

The strip is hidden with the panel, as the grid is, and shows current in
amps mode, as the grid does, with an unknown current as "--" and the
direction still read from power. The card's size counts the strip when it
is drawn.

Part of the spanos3/r202639/03 batch 2 work.
@cayossarian
cayossarian merged commit 77c0106 into prerelease/0.10 Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant