OK, please take it easy on me, I’m very part-time on this, trying to keep a friend’s HA configuration running after her husband passed away. Unfortunately, I live three states away and don’t have the time needed to really get into this and understand everything her husband did.
What I’m trying to do now is correct all the MQTT configuration he has in the old format. There are lights and binary_sensors and sensors, so I need to make changes in each area. The shortest area to use as an example is the binary_sensors.
There is a file called: components\binary_sensors\binary_sensors_mqtt.yaml that contains the following:
I read several of the posts about this change, but I guess I don’t have enough experience with HA to be able to translate the required changes that are shown in generic examples into the specific changes I need to make. If someone could show me the specific configuration changes I need to make with the examples I’ve included, I think I’ll be able to make the rest of the changes.
@zoogara
I just found another post that has some more detail, so combining your reply with that information…
It sounds like I need to create a new file called mqtt.yaml and then add an include statement in the master configuration.yaml file. Since the file is named mqtt.yaml I wouldn’t need to include mqtt: at the top.
In that file I need to move all the configurations that used to say:
- platform: mqtt
state_topic: "stat/Mailbox/POWER2"
name: "Mailbox Top Door"
Now in the mqtt.yaml file they would say:
binary_sensor:
state_topic: "stat/Mailbox/POWER2"
name: "Mailbox Top Door"
repeated for each binary_sensor
Then repeat for each binary_sensor, sensor and light.
I assume that if any of the previously included files end up empty after the refactoring I would just delete it and remove any include statements.
If the mqtt.yaml file ends up being too big and unwieldy, I suppose I could create a file for each type (binary_sensor_mqtt.yaml, sensor_mqtt.yaml, lights_mqtt.yaml) and then add the mqtt: back at the top of each file.