evcc-io/util/templates/class.go
andig 54321c0cf7
Add configuration api (#6035)
Co-authored-by: Michael Geers <michael@geers.tv>
2023-02-08 11:29:27 +01:00

19 lines
259 B
Go

package templates
type Class int
func (c *Class) UnmarshalText(text []byte) error {
class, err := ClassString(string(text))
if err == nil {
*c = class
}
return err
}
//go:generate enumer -type Class
const (
_ Class = iota
Charger
Meter
Vehicle
)