hi all, i have a syntax problem with my configuration. I would like to put all the sensors in the sensor.yaml file, now when I insert the mqtt sensor I get a configuration error, the string I put in sensor.yaml is this:
I assume you have this in your configuration.yaml file:
sensor: !include sensor.yaml
Everything you put into sensor.yaml must be an integration that is normally configured under the sensor: key.
The MQTT Sensor integration doesn’t go under the sensor: key, it goes under the mqtt: key. That’s why you got an error. You can’t mix the two types together.
Leave the MQTT Sensor configuration in the configuration.yaml file. Or create this:
mqtt: !include mqtt.yaml
and put the MQTT Sensor configuration in the mqtt.yaml file like this:
The problem with availability is unrelated to your original question. You had a syntax problem and I explained how to fix it. You followed my instructions and eliminated the syntax problem.
Availability is a separate issue. It was unavailable because of your choice of availability topic and payloads. You should check tele/tasmota_pellet/LWT and confirm its payload is actually Online because it appears that it isn’t and that’s why the sensor reported unavailable.
If you believe the documentation is incorrect, you can correct it. At the bottom of each page is an Edit button. It leads to Home Assistant’s documentation repository on GitHub where you can submit your modification.