// Enable implements the api.Charger interface
Enable implements the api.Charger interface
// Enable implements the api . Charger interface
func (wb *Warp) Enable(enable bool) error {
	if err := wb.enableS(enable); err != nil {
		return err
	}
	action := "stop_charging"
	if enable {
		action = "start_charging"
	}
	topic := fmt.Sprintf("%s/%s/%s", wb.root, "evse", action)
	err := wb.client.Publish(topic, false, "null")
	if err == nil {
		wb.enabled = enable
	}
	return err
}
func ( wb * Warp ) Enable ( enable bool ) error { if err := wb . enableS ( enable ) ; err != nil { return err } action := " " if enable { action = " " } topic := fmt . Sprintf ( " " , wb . root , " " , action ) err := wb . client . Publish ( topic , false , " " ) if err == nil { wb . enabled = enable } return err }
Enable implements the api.Charger interface
Enable implements the api . Charger interface
// set auto_start_charging // trigger start/stop