Configuration example for xiaomi sensor in hassio

Hi. I’ve managed to setup hassio with zigbee2mqtt and successfully connected the sensors. I’m missing the config needed to visualize the sensors on the hassio homepage. Can anybody share a working example. Indicate all files to be edited. Much appreciated.

No configuration is necessary, assuming you set up zigbee2mqtt and home assistant properly:

  • do you have mqtt discovery set up in home assistant?
  • do you have homeassistant: true set up in zigbee2mqtt?

Thanks nickrout!
In home assistant configuration.yaml i have:

mqtt:
broker: a0d7b954-mqtt
username: username
password: pasword
client_id: home-assistant
discovery: true
birth_message:
topic: ‘hass/status’
payload: ‘online’
will_message:
topic: ‘hass/status’
payload: ‘offline’

and the zigbee2mqtt config:

{
“data_path”: “/share/zigbee2mqtt”,
“homeassistant”: true,
“permit_join”: true,
“mqtt_base_topic”: “zigbee2mqtt”,
“mqtt_server”: “mqtt://homeassistant”,
“serial_port”: “/dev/ttyACM0”,
“devices”: [],
“network_key”: []
}

what’s missing?

in the zigbee2mqtt log i can see the perodic messages from the 2 sensors i have connected:

zigbee2mqtt:info 2019-2-2 10:19:01 MQTT publish: topic ‘zigbee2mqtt/0x00158d0002c71636’, payload ‘{“illuminance”:7,“linkquality”:10,“occupancy”:false,“battery”:100,“voltage”:3015}’
zigbee2mqtt:info 2019-2-2 10:29:17 MQTT publish: topic ‘zigbee2mqtt/0x00158d000274f511’, payload ‘{“contact”:true,“linkquality”:0,“battery”:100,“voltage”:3005}’

what’s missing?

thanks again for all help!

Anybody can help? Still no advances…
Thanks for any guidance.

indentation

mine says mqtt://localhost, but I am not running hassio.

Also you don’t have an mqtt username or password.