Duplicate switch entity ids - how to rectify?

Ok i found out the problem. I had a startup automation that was doing “Setoption19 1” to all tasmota devices.
I changed in “0”, rebooted, commented out that part, deleted the core.restore_state, rebooted, and now all “_2” are gone.

Did that, and nothing happened. I still have the same _2 duplicates. core.restore_state got generated again identical, near my bak one. I use Hassio on a Pi3. Cannot access the file mosquitto.db.

i have duplicate entries for my raspberry pi in known devices.yaml and when i go take a look, each one of them has different mac address. i am running ha on docker. supervised manual install on linux host. any thoughts ?

It seems that in .storage\core.config_entries there are duplicated entries. I don’t know where are from coming. But have the same problem.
For the first step I’ve checked all integrations config to disable discovery because all my entities I added in yaml by hand and after I deleted all entites which was duplicated as 1_2, 1_3 … from .storage\core.config_entries and as the result it helped.