Duplicate entry in integration, one entity, not working?

I have several mqtt devices, but one has gone wonky and not sure where to look. It is a light control called piano_color_lights.

It appears as one entity in the entity registry and in the developer states tools.

But if I go into integrations, mqtt, it appears twice. The two entries for it are identical on the integration screen, but if I go into the device screen one of them shows no scripts and no entities, and one shows the expected entity and scripts.

But (presumably) the one connected to the entities has stopped working. Like it’s no longer connected. I suspect (with no facts) that the one that shows entity is not real, and the other one (in integrations) is the real device now.

I have looked in mqtt explorer under homeassistant as a heading and see it once, and it is updating as expected.

That device hasn’t been updated (as in OTA), it may or may not have rebooted. It is a esphome device. It appears once in esphome also as online.

If I restart home assistant nothing changes.

Short of deleting the mqtt integration and starting over (which I can do but am hesitant until I understand this), what else can I check? Any ideas what could be causing this break of the connection from mqtt through entity?

Linwood

PS.I’m on hassio version 105.3 in hass.io running inside a linux vm. No errors in the log from mqtt.

Another thing I noticed that’s wrong and looks buggy is on the integration page showing each integration there are four lights (including the two that are really one) and three sensors.

In the icons showing on the integrations/configured display there are only three lights. It’s like one screen knows there are three, the other thinks there are four.

I confess to being impatient – after not finding anything I deleted the integration and it came back properly.

Does anyone have any idea of the cause, or perhaps more relevant if it happens again, what information can I find or look up or debug to find the bug that caused it (because given that it happened rather spontaneously I think it almost has to be a bug somewhere).

Late reply, but did you have any luck? I’ve had this same problem for over a year. I have to delete the entities in the Integrations panel, then re-add them. Painful. I’ve recently tried adding an access point on my vendor supplied router, hopefully that may help.