Shelly Plus 2PM with ESPHome Configuration Issues

don’t know if this is the reason. But after using this at the top of my yaml. my issue described here appears to be fixed.

Do you think that could be what solved it? I’m slightly hesitant to put the shelly device back in the socket, since it’s quite a hassle.