Home Assistant (HASS) Discovery via MQTT #156
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added Home Assistant discovery to the MQTT destination for all four Enviro boards. It's not absolutely perfect as wind direction and gas resistance aren't detected currently since HASS doesn't have a device class for direction or resistance, but other than that I believe all other entities should work. I've tested this with my Enviro Weather board but since I don't have the other three boards I can't say for sure that those ones will detect.
This could also be improved for the small group of people who change their HASS MQTT discovery term by replacing the checkbox on the setup page with another text entry field and if the text field is empty the code won't fire the HASS discovery publishes. But I'm burned out enough as it is so a checkbox will have to do.
Here's it in my Home Assistant client to show it's working.