Mqtt client component connects to your mqtt broker.
This broker for most cases should be the same broker as Home Assistant broker, so you can’t directly see new device with HA MQTT discovery option.
Example config¶
mqtt:
host: localhost
username: mqtt
password: mqtt
topic_prefix: boneio1
ha_discovery:
enabled: yes
Configuration variables:¶
- host (Required, string) - Mqtt broker hostname or IP address
- username (Optional, string) - Username to connect ot mqtt broker
- password (Optional, string) - Password to mqtt broker
- port (Optional, integer, default: 1883) - Port to connect to mqtt broker
- topic_prefix (Optional, string, default: boneIO) - Prefix topic for boneIO to use. It’s means that this name will be used in HomeAssistant.
- ha_discovery:
- enabled (Optional, boolean, default: True) - Enable HA discovery
- topic_prefix (Optional, string, default: homeassistant) - Topic prefix which HomeAssistant uses for MQTT discovery.