Re-enable a disabled entity and it loses its friendly_name

If you have a moment, try this experiment and let me know its result. Caution, you may need to restart Home Assistant as a result of this experiment.

All you need to do is disable an entity and then re-enable it. Entities that permit this operation are created by integrations that are configured via config-flow. Theoretically, the re-enabled entity should be restored to full functionality, immediately. In practice, it minimally loses its friendly_name and often is no longer restored as a functional entity.

  1. Go to Configuration > Integrations
  2. Pick an integration and click its link indicating the number of entities it contains.
  3. Now you’re in Configuration > Entities and it’s showing only the selected integration’s entities.
  4. Click the filter icon in the upper right hand corner and select “Show disabled entities”.
  5. Click one of the entities, set Enable_entity to off, then click Update.
  6. The entity will now appear in the list with its friendly_name set to Unavailable and, in the Status columns, there’s an icon indicating the entity is disabled. It has also been removed from the Developer Tools > States view and the auto-configured Lovelace UI. All of this is expected behavior, so far.
  7. Click the disabled entity, set Enable_entity to on, then click Update.
  8. For the integrations I have tested, the friendly_name remains Unavailable. That’s not expected behavior.

I’ve performed this experiment with:

  1. Input_numbers and other “Helpers” created via the UI.

    Requires restarting Home Assistant to restore the re-enabled entity’s full functionality.
  2. MQTT

    Requires restarting.
  3. Google Cast

    Requires restarting.
  4. Brother Printer

    Corrects itself after about a minute’s delay.
  5. Philips Hue

    Corrects itself after a delay of a few seconds.

NOTE
In case you’re wondering, refreshing the web page doesn’t fix the problem. For some integrations, the re-enabled entity no longer exists in the States view and a restart is required to bring it back.

Here are my results:

  1. Tuya
    Every step behaved as you described except refreshing the page did bring back the friendly_name in my case.

  2. Google Cast
    When disabled the entity disappeared entirely from the list rather than displaying Unavailable. I had to switch to the Entities tab to re-enable and when I switched back to the Devices tab the friendly_name did reappear.

Hope this helps. Let me know if you’d like me to try anything else.

Thank you!

I’ve also seen what you observed where the name simply disappears instead of appearing as Unavailable.

For the Tuya integration, instead of refreshing the page, simply wait for about a minute and see if it updates the name automatically.

This experiment is to determine if the bug affects only the few integrations I have or is part of a more comprehensive phenomenon. My personal theory (more of a wild guess) is that the name re-appears (and the entity re-appears in the States view) only if and when the integration does a poll of its entities. If the integration performs no polling, like the MQTT integration, then a restart is needed to force a complete refresh of the integration’s entities.

1 Like

OK, I got a little different behavior this time. When I disabled the same Tuya entity it disappeared altogether, just like the previous Cast entity. So again, I had to go to the Entities tab to re-enable, but when I switched back to Devices it appeared as Unavailable for roughly 10 seconds then the friendly_name did reappear on its own (as you predicted).

Might be detecting a pattern here.

  • Integrations that use polling will eventually refresh the re-enabled entity’s information (depends on their polling interval).

  • Integrations that use push never refresh the re-enabled entity’s information (only happens on startup).

Integration IoT Class
Tuya Cloud Polling
Brother Printer Local Polling
Philips Hue Local Polling
Google Cast Local Polling
MQTT Local Push

Not included in that list of integrations are input_numbers, input_text, input_boolean, etc, basically “Helpers” created via the UI. They aren’t assigned an IoT Class in the documentation but it stands to reason that they perform no polling and are updated only when a user or automation/script acts on them (which means, after being re-enabled, the only way they can be refreshed is by restarting).

If anyone uses “Local push” integrations, I would appreciate if you could take a moment to perform this simple experiment and report your results.

got he same with MQTT entity…
when I manually update the state of the entity (to ‘off’) for example, the entity came back to available