Commit Graph
7 Commits
Author SHA1 Message Date
Dermot Duffy 03d9df8282 chore: Standardize code, comments and docs on US-English spelling (#2707) 2026-08-23 08:57:41 -07:00
Dermot Duffy a8aa9ec7c2 fix: Should recover from an interrupted initialization (#2673) 2026-08-10 14:27:40 -07:00
Dermot Duffy 673d8fe133 test: Add browser tests for the media viewing gallery and viewer (#2661) 2026-08-07 16:08:56 -07:00
Dermot Duffy c137f4c00c fix: Report and retry media failures for every camera in a grid (#2658)
- Closes: #2637
 - Related: #2099
2026-08-05 21:35:47 -07:00
Dermot Duffy 2d124fe3cd test: Add a test harness for the built card (#2653)
Mounts the card from `dist/` the way Home Assistant does, by URL with a
HACS tag, and asserts the entry stays a facade, that no chunk imports
it, that the browser is served the file unmodified, and that the card
starts up and fetches a language chunk lazily.

Runs in Chromium, Firefox and WebKit, so a change of bundler or minifier
is checked against every engine.
2026-08-03 21:50:21 -07:00
Dermot Duffy 5d247d4074 test: Add browser based tests for keyboard focus handling (#2647) 2026-08-02 16:38:17 -07:00
Dermot Duffy 17146c8ca6 fix: Clear the initialized condition state when the card is not usable (#2646)
The `initialized` state (used in conditions/triggers) was written once
and never cleared, so it meant "has this card ever been initialized"
while everything reading it took it as "is this card usable now". Home
Assistant takes a card off the page and puts it back whenever its
dashboard tab is left and returned to, so the card initialized again
while the state claimed it was initialized throughout: `trigger:
initialized` fired once per card rather than once per startup, and
automations were dropped in between.

The card lifecycle is now an explicit state machine (`SessionManager`),
the only writer of `initialized`, which separates a card that is
starting up from one initializing part of itself again while it runs. A
new `ever` parameter (conditions/triggers) selects the old latched
behaviour.

`remote_control` uses that parameter to keep its two camera priorities
correct under repeated starts. With `camera_priority: entity` the card
now re-reads the entity every time it starts, so a camera selected while
the card was away is picked up on return. With `camera_priority: card`
the card writes the entity on its first start only, unchanged, since
repeating that write would overwrite a camera the user had selected.

Closes: #2642


BREAKING CHANGE: `condition: initialized` is now `false` whenever the
card is not usable, and `trigger: initialized` fires each time the card
starts up rather than only the first time. Set `ever: true` on either to
keep the previous behaviour.
2026-08-02 12:52:58 -07:00