AnaviTechnology / anavi-thermometer-sw

Open source Arduino sketch for the smart WiFi dev board ANAVI Thermometer
GNU General Public License v3.0
27 stars 17 forks source link

Fix HA Discovery: each device needs to be unique #30

Closed cederlys closed 4 years ago

cederlys commented 4 years ago

Home Assistant seems to get confused when the temperature sensor and pressure sensor have exactly the same device information. By appending the name suffix to the name, things seem to work better.

I'm not 100% sure this is the correct thing to do, though. I have not been able to find a resource that explains the relationship between devices, entities, the state machine, and MQTT Discovery in a way that I fully understand. That said, this seems to work better.

leon-anavi commented 4 years ago

Interesting, I am not an expert in Home Assistant internals for device names. The patch looks good to me and if it makes things better then we need it :)

Thanks, Leon