I started to prepare my MQTT and add it to my configuration.yaml:
55 #including
56 mqtt: !include mqtt.yaml
57 group: !include groups.yaml
58 automation: !include automations.yaml
59 script: !include scripts.yaml
60 scene: !include scenes.yaml
61 binary_sensor: !include binary_sensor.yaml
62 sensor: !include sensor.yaml
i also create the file mqtt.yaml and it seems to be ok since it shows green.
But it gives me this error:
The system cannot restart because the configuration is not valid: Invalid config for [mqtt]: [mqtt] is an invalid option for [mqtt]. Check: mqtt->mqtt->mqtt. (See /config/configuration.yaml, line 55).
for me it doesnt make sense.
If you include a file mqtt: !include mqtt.yaml the you must put all the mqtt items below this and you cannot have mqtt: in that file. You cannot put it mqtt: in any of your other sensor or binary_sensor files.
If you want multiple files below the mqtt: to divide sensors, binary_sensors, switches etc then put this in configuration.yaml
mqtt: !include_dir_merge_named mqtt
Then make a directory called mqtt and inside this you can put multiple yaml files. What it means is - take all files inside mqtt and merge them to one long virtual file included under the mqtt: top level key word