mirror of
https://github.com/home-assistant/frontend.git
synced 2026-09-14 12:40:30 +01:00
Make energy dashboard card visibility declarative via the catalog Route the five energy view strategies and the dashboard strategy through the shared ENERGY_CARD_CATALOG instead of re-deriving each card's applicability conditions inline. A new isEnergyCardVisible() helper makes the catalog the single source of truth for whether a card is shown, so the strategies and the customise dialog can no longer disagree. Behavior-preserving; adds a contract test pinning isEnergyCardVisible to the catalog for every entry.