OpenWB: fix enable/disable

This commit is contained in:
andig 2021-10-09 09:56:22 +02:00
parent ad0211e9c6
commit e019112489

View file

@ -99,7 +99,7 @@ func NewOpenWB(log *util.Logger, mqttconf mqtt.Config, id int, topic string, p1p
// setters
enableS := provider.NewMqtt(log, client,
fmt.Sprintf("%s/set/lp%d/%s", topic, id, openwb.EnabledTopic),
1, timeout).BoolSetter("enable")
1, timeout).WithPayload("${enable:%d}").BoolSetter("enable")
maxcurrentS := provider.NewMqtt(log, client,
fmt.Sprintf("%s/set/lp%d/%s", topic, id, openwb.MaxCurrentTopic),
1, timeout).IntSetter("maxcurrent")