I’m getting this message after upgrading to 2023.6 and I really can’t make sense of it. I reworked my configuration painstakingly to get rid of all and any warnings on 2023.5.
There’s no configuration line given, either, so I really don’t know where to look to fix this.
What does your config look like?
Here is an example of mine that works:
mqtt:
switch:
- name: “One Lights”
state_topic: “shellies/OneLights/relay/0”
command_topic: “shellies/OneLights/relay/0/command”
payload_on: “on”
payload_off: “off”
retain: false
icon: hass:lightbulb
This is the old version:
switch:
platform: mqtt
name: “One Lights”
state_topic: “shellies/OneLights/relay/0”
command_topic: “shellies/OneLights/relay/0/command”
payload_on: “on”
payload_off: “off”
retain: false
icon: hass:lightbulb
(Edit - sorry, not sure how to get the above to look like code)
It means you’ll have to remove platform mqtt from you configuration.yaml. it now it stored seperately from UI.
Not sure if it’s automatically imported there, so don’t throw the current lines away yet. (Comment them out).
Error will go away
sorry, mqtt seems slightly different. The ‘platform’ like @eftimg showed as 'old’config, isnt supported, moving to ‘mqtt’ tags is supported. So indeed this config should work, but if you say there is still error, please check if there is leftovers on a tag ‘platform’ remaining.
The only platform: mqtt I can find is in automations. Bit annoying. Using HA since 2017 and not one upgrade goes by where things don’t break … I will try to do more research where this message comes from and how to avoid it.
Right, you need to look in switch.yaml based on your screenshots.
You have a
- platform: mqtt
somewhere in that file.
FYI, I highly suggest you guys use text editors that can search files. VSCode → Find all in files → search for platform: mqtt, done. Ignore the ones in automations.
I am still having this warning but I’ve checked my configuration.yaml and cannot find any “platform: mqtt” configurations. Any idea what else should I check?
Ah. Thanks. I did a search and found all “platform: mqtt” are in the zigbee2mqtt.yaml. I’ll leave them be at this moment. The entities are not used and probably z2m team will fix them in the next update.