If energy setup was completed but there are no sources available, start setup wizard again

This commit is contained in:
codyc1515 2024-02-10 09:13:32 +00:00
parent f717e51fbe
commit fac88238fe
1 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,14 @@ export class EnergyViewStrategy extends ReactiveElement {
return view;
}
// No energy sources available, start from scratch
if (
prefs!.device_consumption.length === 0 &&
prefs!.energy_sources.length === 0
) {
return setupWizard();
}
view.type = "sidebar";
const hasGrid = prefs.energy_sources.find(