evcc-io/api/feature.go
2023-08-15 23:01:23 +02:00

20 lines
287 B
Go

package api
type Feature int
func (f *Feature) UnmarshalText(text []byte) error {
feat, err := FeatureString(string(text))
if err == nil {
*f = feat
}
return err
}
//go:generate enumer -type Feature
const (
_ Feature = iota
Offline
CoarseCurrent
IntegratedDevice
Heating
)