Please move the configuration to the mqtt integration key and restart Home Assistant to fix this issue

Just upgraded to the last version of Homeassistant (2022.9.0) and now I’m getting the below messages:

Manually configured MQTT binary_sensors found under platform key binary_sensor
Manuallly configured MQTT buttons found under platform key buton
Manuallly configured MQTT switches found under platform key switch
Manuallly configured MQTT sensors found under platform key sensor

Please move the configuration to the mqtt integration key and restart Home Assistant to fix this issue

I’m completely at a loss on what this message means:
Does it mean the configuration.yaml format is incorrect - maybe because the format has changed?
Looking at the configuration.yaml, it seems the format is completely different so its a lot of work to be done!
For example, I have:


  • platform: mqtt
    state_topic: “cmnd/loftPIR/POWER2”
    name: “Loft PIR”

Does this mean I have to change it to:
- state_topic: “cmnd/loftPIR/POWER2”
name: “Loft PIR”

Any help wil be appreciated

This was actually really easy for me (and we have been warned about this change for several releases now).
Here is my config:

  sensor: !include_dir_merge_list cfg/_component/mqtt/sensor/
  binary_sensor: !include_dir_merge_list cfg/_component/mqtt/binary_sensor/
  switch: !include_dir_merge_list cfg/_component/mqtt/switch/

Then in cfg/_component/mqtt/sensor/boiler_temperature.yaml:

  - name: "Boiler Return"
    state_topic: "building/dhjm/eobs/99031647c54fff28"
    unit_of_measurement: '°C'
    value_template: "{{ value_json['obs']['temperature']|float }}"
    device_class: temperature
    unique_id: onewire-cb6a6c2d-b7e1-4369-9088-dd559fd6e9e9

  - name: "Boiler Water Out"
    state_topic: "building/dhjm/eobs/99031647c54fff28"
    value_template: "{{ value_json['obs']['temperature']|float }}"
    unit_of_measurement: '°C'
    device_class: temperature
    unique_id: onewire-fa42e7c4-1e87-4622-900f-75f517061933

Basically all you need to do to take your example is this:

 - platform: mqtt # remove this line
   state_topic: "cmnd/loftPIR/POWER2" 
   name: "Loft PIR" # stick a - at the front

so it looks like this:

    state_topic: "cmnd/loftPIR/POWER2"
  - name: "Loft PIR"
1 Like

Thanks Andrew for your input
I spent quite some time yesterday trying to figure out the new code , but it was tricky to say the least!
basically, is not enough with changing the new entries, you have to take into consideration the context: there are some bits before and after the "offending"code, so is not enough to modify it in situ.
At the end I had to move all the MQTT binary_sensor, sensors, switches, buttons to a new section were it would not clash with the rest of the configuration
The only good side effect was that now the code is a bit neatier
All in all, I’m not sure why the developers had to change the syntax. Obviously they forgot the old adage: “if ain’t broken don’t fix it”
Thanks anyway


Pretty much for the same reason that they did the same thing with template sensors I guess.

Speaking of adages, there’s an old Home Assistant adage:
“Woe is he who reads not the Release Notes before he upgradeth.”

FWIW, advanced notice was provided in June.

1 Like

That’s not a particularly illuminating response. For many of us who only upgrade periodically, the mass of borked config that happens with upgrades is very frustrating. Hand waving it away with “we warned you” doesn’t make it ok.

1 Like

Following up on Andrew’s helpful examples, I redid my mqtt sensors without much fuss. In my case I had a single file with all my “sensor” sensors. I had to split out the mqtt ones into a new file so that I could include them under the mqtt key as Andrew showed.
I had to do the same for my binary_sensors.

It wasn’t as simple as a deleting a line. Your (the reader) situation will depend on whether you’ve grouped different sensors or not.

Oh I fully agree that it’s a bit of a headache. But I guess it’s better for them to make such a substantial change before the average less technical user is able to start purchasing the Home Assistant Yellow - it will be too late to make those sorts of major changes then.

I would assume there was an architectural benefit possibly even a performance boost, with this change.

Hi there all,
many of us have no time to stay on the Home Assistant forum every day.
Someone configure HA, and when done, it will use it for mouths without touch it…

So in my opinion I think that when there is a big and important modify like this one on MQTT,
is better to have a mailing list that announce it time before in order to have time to modify.
…just my opinion.
Thanks all

For me it is just a nightmare:(
I dont even undersand where I can find the cfg/_component/mqtt/sensor/ location :frowning:
Is this a homeassistant directory?

This is specifically my configuration.
that is folder path relative to the /config directory which is where your configuration.yaml exists.

For you - you would create an mqtt directory, and then a sensor folder inside it.
Then change the path to mqtt/sensor/ instead of cfg/_component/mqtt/sensor/

Thing is this doesnt happen without you pushing the update button. If you leave your HA alone it wont change and all your old syntax will work.
If you however update its on you to read the updates regarding breaking changes / changes.
There is a link with patch notes on each update you push, if you jump alot of versions its again on you to read back notes on breaking stuff. You can check which versions you jumped in the UI.

Again, this will only affect your installation if YOU press the update.

Can u post your mqtt sensors and or other mqtt configuration?
Its easier to help then with migrating it.

There is a YouTube explaining how to fix;


Thank you @javiermi - a very useful video.

I was also confused by this change, and for those who felt moved to criticise OP and others of us for not knowing about this change or for struggling to interpret and fix it, please remember this is a help and support forum. Shame on you.

1 Like

Home assistant will never be a software for the “less technical users”, let’s please stop trying to cater home assistant for a public which simply doesn’t exits.
Home Automation requires a minimum of skills, if once a few releases one has to reconfigure all its yaml or simply yaml is not supported anymore that’s quite detrimental to the whole project.

Oh no, really?
You’d better tell them then, because there is no point in producing off-the-shelf Home Assistant hardware then is there?
We all know the optimum experience is a Virtual Machine running Home Assistant OS. And there was no reason for them to make the Sky Connect either, because us more technical users could DIY something together to get Thread working.

I mean… it’s almost like they have done actual market research, and identified that the market you claim does not exist, does in fact exist. They definitely didn’t produce THREE consumer products for a market that doesn’t exist…