Fix status reason ot updated (#15873)

This commit is contained in:
premultiply 2024-09-03 07:04:23 +02:00 • committed by GitHub
parent 53e025b6dd
commit 5489a15b24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1674,7 +1674,7 @@ func (lp *Loadpoint) Update(sitePower float64, rates api.Rates, batteryBuffered,
lp.publish(keys.Connected, lp.connected())
lp.publish(keys.Charging, lp.charging())
if sr, ok := lp.charger.(api.StatusReasoner); ok && lp.GetStatus() == api.StatusB {
if sr, ok := lp.charger.(api.StatusReasoner); ok {
if r, err := sr.StatusReason(); err == nil {
lp.publish(keys.ChargerStatusReason, r)
} else {