I’ve tried this several times. I have MQTT working and can control a GPIO pin on an ESP8266. I want to monitor a DHT22 on another ESP8266 and have added the default sensor code to HASS as a start for building my sensor. As soon as I do this, HASS dies and will not start but oddly, nothing is written to the log so that makes debugging somewhat tricky (0 bytes). Can someone else try adding the default MQTT sensor component and report back? I’m running 0.25.2. Oddly, the MQTT binary sensor works just fine.
Do you have another sensor platform in your config? If so, you need to decide how to structure your YAML to cater for all sensor platform entries. This is true for all components with possibly multiple platforms. See:
It sounds weird that there’s no log output. Have you tried following the log live after start? Do this either via journal command:
sudo journalctl -f -u home-assistant@[your user]
if you run hass as a service or by just running hass manually and watch the console output.
Thank you. I had not been taken any notice of that page as I built my system but as I only had one of everything, didn’t look like that was the issue. Started with a fresh config file and only added a couple of MQTT devices and when I add the last one to monitor temperature, HASS will not start and the logfile is 0 bytes. sudo journalctl -f -u home-assistant@pi also prints nothing out.
Thanks. So this is what you get back with office/sensor1? I’m using ESPEasy which can send the temperature # direct as a payload. For some reason, HA wont start though when I add a temperature sensor but I’ll try again now and report.
I moved my sensors over to its own yaml file which has a different formatting protocol and it worked a treat. I’d always planned to create separate yaml files but the DHT sensor issues forced my hand.
Part of my configuration.yaml to bring in the ‘sensors’
i was trying to keep all my sensors in individual files grouped in a directory called sensors.
it seems that it is just not MQTT sensor that have an issue to this type directory/file structure.
I also had yahoo weather in a sub file too …