Home Assistant Community

Mqtt error hassbian

#1

hi i am new to hassbian , can anyone guide me how to setup mqtt in hassbian home assistant.

i have done the setup

mqtt:
broker:192.168.1.150
port:1883
client_id:homeassistant
username:username
password:[email protected]

but i am getting an error

Invalid config for [mqtt]: expected a dictionary for dictionary value @ data[‘mqtt’]. Got ‘broker:192.168.1.150 port:1883 client_id:homeassistant username:username password:[email protected]’. (See ?, line ?). Please check the docs at https://home-assistant.io/components/mqtt/

pls help
Thanks

#2

First things first. In YAML, spacing is EXTREMELY important. You have posted an invalid configuration, based on spacing alone. Please post your ACTUAL code with the code tags, and you do have a broker running at that IP address, right?

#3

#4

The lines after mqtt: must be indented by two spaces (and not a tab).
For each option, leave a space between the colon (:) and the value.

mqtt:
  broker: 192.168.1.150
  port: 1883
  client_id: homeassistant
  username: username
  password: [email protected]
#5

Hey thanks guys ,
That was the issue , now its working.