chore: simplify
This commit is contained in:
parent
d8c9d92a3c
commit
054635444e
1 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue