evcc-io/core/loadpoint_charger.go

16 lines
451 B
Go

package core
import (
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/core/keys"
)
// chargerHasFeature checks availability of charger feature
func (lp *Loadpoint) chargerHasFeature(f api.Feature) bool {
return hasFeature(lp.charger, f)
}
// publishChargerFeature publishes availability of charger features
func (lp *Loadpoint) publishChargerFeature(f api.Feature) {
lp.publish(keys.ChargerFeature+f.String(), lp.chargerHasFeature(f))
}