mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-03 15:36:35 +00:00
Fix default strategy when energy is not configured (#9827)
* Fix default strategy when energy is not configured * Address comment Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
b802a410b9
commit
f4dcce6d6c
@ -53,7 +53,15 @@ export class OriginalStatesStrategy {
|
|||||||
hass.loadBackendTranslation("title"),
|
hass.loadBackendTranslation("title"),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const energyPrefs = energyPromise ? await energyPromise : undefined;
|
let energyPrefs: EnergyPreferences | undefined;
|
||||||
|
|
||||||
|
if (energyPromise) {
|
||||||
|
try {
|
||||||
|
energyPrefs = await energyPromise;
|
||||||
|
} catch (_) {
|
||||||
|
// Nothing to do here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// User can override default view. If they didn't, we will add one
|
// User can override default view. If they didn't, we will add one
|
||||||
// that contains all entities.
|
// that contains all entities.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user