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

Feature request for mqtt: discovery for Home Assistant #108

Open
MaxRower opened this issue Oct 14, 2022 · 1 comment
Open

Feature request for mqtt: discovery for Home Assistant #108

MaxRower opened this issue Oct 14, 2022 · 1 comment

Comments

@MaxRower
Copy link

Home Assistant won't recognize devices until there is some sort of announcement, what kind of fields to expect in the payload. Maybe this could be included in the mqtt service?

Example of one field in a Sonoff temp & humidity sensor:
MQTT publish: topic 'homeassistant/sensor/0x00124b00253c5f14/temperature/config', payload '{"availability":[{"topic":"myhome/bridge/state",
"value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x00124b00253c5f14"],"manufacturer":"SONOFF","model":"Temperature and humidity sensor
(SNZB-02)","name":"Temp Sensor"},"device_class":"temperature","enabled_by_default":true,"name":"Temp Sensor temperature","state_class":"measurement","state_to
pic":"myhome/Temp Sensor","unique_id":"0x00124b00253c5f14_temperature_myhome","unit_of_measurement":"°C","value_template":"{{ value_json.temperature }}"}'

Messages should be generated according to the weather.ini template_txt config.

@pkerney
Copy link

pkerney commented Oct 14, 2022

My guess is that you want automatic recognition like Tasmota does?
I have pywws integrating with my HA, but it is very manual.
I can paste my pyswws:weather.ini and my hassio:configuration.yaml if you need it.
You may be able to do it with the template_txt parameter from the [mqtt] section, but I decoded it on the hassio side as I didn't want to break some other platforms I have setup.

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

No branches or pull requests

2 participants