Rename range to vehicleRange
This commit is contained in:
parent
da3c98d08d
commit
b809356d4f
15 changed files with 45 additions and 36 deletions
|
|
@ -124,6 +124,14 @@ func (m *MQTT) Run(site site.API, in <-chan util.Param) {
|
|||
updated := time.Now().Unix()
|
||||
m.publish(fmt.Sprintf("%s/updated", m.root), true, updated)
|
||||
|
||||
// remove deprecated topics
|
||||
for id := range site.LoadPoints() {
|
||||
topic := fmt.Sprintf("%s/loadpoints/%d", m.root, id+1)
|
||||
for _, dep := range []string{"range", "socCharge", "vehicleSoc"} {
|
||||
m.publish(fmt.Sprintf("%s/%s", topic, dep), true, nil)
|
||||
}
|
||||
}
|
||||
|
||||
// publish
|
||||
for p := range in {
|
||||
topic := fmt.Sprintf("%s/site", m.root)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue