If the app config contains a schema field like this one:
```
privileges:
- "list(ALTER|CREATE|...|UPDATE)?"
```
it was rendered incorrectly as a drop-down where only one item can be
selected - but this is wrong because of the preceding `-` denoting it
should be a list containing the listed values. Supervisor translated
this to an entry of type `select` with `multiple: true`. The `multiple`
flag wasn't passed along, with the flag set the field renders as
expected.
Fixes#51533
* Fix history/sensor cards stuck loading after backend restart
- Add { resubscribe: false } to history subscriptions to prevent
corrupt HistoryStream state on auto-resubscription
- Add connection-status handlers to re-subscribe on reconnect
- Add sentinel pattern to prevent re-entrant async subscriptions
- Add shouldUpdate/updated retry when components become available
- Clear sensor device classes cache on WS error
- Clear _error on reconnect so cards can retry
- Add .catch() on unsubscribe to handle dead subscriptions
* Fix type annotation for callWS in getSensorNumericDeviceClasses
* Address review: type connection-status handlers, add reconnect to history panel
- Use HASSDomEvent<ConnectionStatus> instead of (ev as CustomEvent).detail
for proper type safety on all connection-status handlers
- Add connection-status handler to ha-panel-history so it re-subscribes
after backend restart (addresses concern about resubscribe: false)
* Address review: sentinel pattern, reconnect handling, stale data reset
- Add sentinel pattern to ha-more-info-history, ha-panel-history,
hui-history-graph-card to prevent re-entrant subscription races
- Refactor hui-trend-graph-card-feature from SubscribeMixin to manual
subscription management with connection-status reconnect support
- Reset stale history/statistics data on reconnect in
hui-history-graph-card and hui-map-card before re-subscribing
- Wrap fetchStatistics and getSensorNumericDeviceClasses calls in
ha-panel-history with try/catch to handle errors gracefully
- Chain .catch directly on subscribeHistoryStatesTimeWindow in
hui-trend-graph-card-feature to avoid detached-promise race condition
* Centralize history stream reconnect handling in data layer
Move the reconnect logic from every consumer into `subscribeHistoryStream`
in data/history.ts. The helper listens to the connection's `ready` event
itself, and on reconnect creates a fresh `HistoryStream` and rebuilds
params (so `start_time` for the time-window variant is re-anchored to
"now"). `resubscribe: false` stays as an internal implementation detail.
Removes the duplicated `_handleConnectionStatus` boilerplate and
`connection-status` window listeners from all six history consumers.
* Render subscription errors and make _error reactive
`_error` was declared as a plain string field in hui-graph-header-footer
and ha-more-info-history (non-reactive) and typed as Error/string while
being assigned the WS error object. hui-trend-graph-card-feature had it
reactive but never rendered it.
Align all three with the hui-history-graph-card pattern: reactive
`{ code, message }` and a user-visible error branch in render(). Without
this, a failed subscription would leave the component stuck on a spinner
forever.
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>