Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HAST Support through MQTT #50

Open
lbussy opened this issue Feb 22, 2023 · 1 comment
Open

Add HAST Support through MQTT #50

lbussy opened this issue Feb 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@lbussy
Copy link
Owner

lbussy commented Feb 22, 2023

Shared by mper on HBT:

There is a feature in Home Assistant called MQTT discovery. If you put a standard message on the broker then HA will automatically create a sensor for that.

This is an example of what I use to create a beer sensor with some value and attributes:

homeassistant/sensor/${mdns}_beer${tap}/config:
{\"name\":\"${mdns}_beer${tap}\",\"state_topic\":\"homeassistant/sensor/","${mdns}_beer${tap}/state\",\"json_attributes_topic\":\"homeassistant/","sensor/${mdns}_beer${tap}/","attr\",\"unique_id\":\"${mdns}_beer${tap}\"}

homeassistant/sensor/${mdns}_beer${tap}/state:
${beer-name}

homeassistant/sensor/${mdns}_beer${tap}/attr:
{\"abv\":${beer-abv},\"abv\":${beer-abv},\"ibu\":${beer-ibu},\"ebc\":"${beer-ebc}}
@lbussy lbussy added the enhancement New feature or request label Feb 22, 2023
@lbussy
Copy link
Owner Author

lbussy commented Feb 27, 2023

This is going to have to wait till after I port to the ESP32 (#51).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant