Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.44 KB

README.md

File metadata and controls

35 lines (23 loc) · 1.44 KB

hass-mqtt

Home Assistant MQTT projects and notes

Setup MQTT broker in Home Assistant

There is a built in broker, but I decided to use the addon broker in hassos instead. There was an issue using TLS between the containers, but otherwise the setup was pretty straight forward. More details:

First MQTT sensor

Home Assistant can generate sensors dynamically if you enable the MQTT discovery option. Once enabled the following topic/payloads will create new entities.

Topic: homeassistant/binary_sensor/garden/config
Payload: {"name": "garden", "device_class": "motion"}

Topic: homeassistant/binary_sensor/garden/state
Payload: ON
Payload: OFF

To remove the sensor send an empty payload to the same config topic

More resources