change sensor discovery
This commit is contained in:
2
main.go
2
main.go
@@ -213,7 +213,7 @@ func renameSensor(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
// Republish discovery for this sensor
|
||||
if err := mqttClient.PublishSensorDiscovery(sensor.Protocol, sensor.Model, sensor.ID); err != nil {
|
||||
if err := mqttClient.PublishSensorDiscovery(sensor); err != nil {
|
||||
log.Printf("Error republishing sensor discovery: %v", err)
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
Reference in New Issue
Block a user