Sessions: fix missing loadpoint names (#18868)
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

This commit is contained in:
Michael Geers 2025-02-16 17:00:48 +01:00 • committed by GitHub
parent c2fc6ff297
commit d3814b1437
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -241,6 +241,14 @@ func NewLoadpointFromConfig(log *util.Logger, settings settings.Settings, other
lp.mode = api.ModeOff
}
if lp.Title != "" {
lp.setTitle(lp.Title)
}
if lp.Priority > 0 {
lp.setPriority(lp.Priority)
}
return lp, nil
}
@ -280,14 +288,6 @@ func (lp *Loadpoint) restoreSettings() {
return
}
// from yaml
if lp.Title != "" {
lp.setTitle(lp.Title)
}
if lp.Priority > 0 {
lp.setPriority(lp.Priority)
}
// deprecated yaml properties
if lp.Phases_ > 0 {
lp.log.WARN.Printf("ignoring deprecated phases: %d. please configure via UI", lp.Phases_)