chore: simplify

This commit is contained in:
andig 2025-03-07 14:05:17 +01:00
parent d8c9d92a3c
commit 054635444e

View file

@ -16,11 +16,7 @@ func (lp *Loadpoint) chargerHasFeature(f api.Feature) bool {
// publishChargerFeature publishes availability of charger features
func (lp *Loadpoint) publishChargerFeature(f api.Feature) {
c, ok := lp.charger.(api.FeatureDescriber)
if ok {
ok = slices.Contains(c.Features(), f)
}
lp.publish(keys.ChargerFeature+f.String(), ok)
lp.publish(keys.ChargerFeature+f.String(), lp.chargerHasFeature(f))
}
// chargerSoc returns charger soc if available