Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish 'unavailable' and 'not provided' #155

Open
RoboMagus opened this issue Nov 14, 2024 · 1 comment
Open

Distinguish 'unavailable' and 'not provided' #155

RoboMagus opened this issue Nov 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@RoboMagus
Copy link
Contributor

Looking at the /config/entities page in HA we can filter entities by status, where HA is able to distinguish between entities that are merely unavailable or not provided. The difference is in my case best explained as an entity in an Esphome device that is offline, versus an entity that was removed from the Esphome config (e.g. an orphaned entity).

Sadly both these states show up as unavailable, but it seems HA is able to indicate no longer provided entities by adding a restored=True flag to the state object.

It'd be nice to filter out entities that are expected to go offline every once in a while, but still have them indicated when they would be no longer provided.

@dummylabs
Copy link
Owner

dummylabs commented Nov 15, 2024

It seems like a great idea to me. From what I understand, not_provided is essentially a subcategory of unavailable in Home Assistant. That is, an entity can be unavailable and not_provided, but not the other way around. To differentiate between these states, we should introduce two additional states:

  • offline for unavailable and restored=False
  • not_provided for unavailable and restored=True.

And unavailable will encompass both of these new states. It may seem a bit redundant, but should be effective.

@dummylabs dummylabs added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants