This problem started with the MQTT name change in 2023.8, I am now on 2023.8.4 which was supposed to remove some of the change and did not help me.
Short version: Names that looked like piano_outlet now look like piano_oulet_piano_outlet with a duplicated name, which broke all the scripts, automations, and such.
I have tried a variety of things without success. It appears I can sometimes fix this by changing the “Name:” attribute in the esphome file to be slightly different, but that appears to only work when I have invalid device names (I had old names with an underscore, which esphome does not now allow as best I can tell).
The problem APPEARS to be that if the “Name” field in the esphome file has the device name as part of it, it gets duplicated. If I leave it out, it does not duplicate but then devices disappear as duplicated.
Example consider these two separate files (all the other stuff omitted as irrelevant):
esphome:
name: "piano-outlet"
switch:
- platform: gpio
name: "Switch"
esphome:
name: "north-outlet"
switch:
- platform: gpio
name: "Toggle"
This yields devices:
switch.piano_outlet_switch
switch.north_outlet_toggle
If instead I change the word toggle to “switch” then the north_outlet_switch disappears and it complains about a duplicate in the log (oddly complaing about piano not north). This despite being in separate devices in separate files (and the MQTT topics are appropriately different).
If instead, which is what I had at first, I do this:
esphome:
name: "piano-outlet"
switch:
- platform: gpio
name: "Piano Outlet Switch"
esphome:
name: "north-outlet"
switch:
- platform: gpio
name: "North Outlet Switch"
This yields devices:
switch.piano_outlet_piano_outlet_switch
switch.north_outlet_north_outlet_switch
with duplicated names. Which also do not work with existing scripts (and I really do not want those as then google assistant I have to repeat the names).
I installed 2023.8.4 because it was supposed to have a change to this, but I see no difference.
Am I missing something or did they just fundamentally break the MQTT link from ESPHOME?
Should I try switching to the API? I’ve never used the API.
Linwood