Use state value for authorization required for more frequent updates#230
Merged
sveinse merged 2 commits intocustom-components:masterfrom Jul 23, 2025
Conversation
Use `authentication_required` instead of `is_authorization_required` since that is part of the state update. Fixes (part of) custom-components#219
sveinse
reviewed
Jul 23, 2025
Comment on lines
286
to
293
| elif entity.unique_id.endswith("_is_authorization_required"): | ||
| # There is an entity using authorization_required as a translation key in | ||
| # both the installation and the charger device. We only want to replace the | ||
| # entity associated with the charger, so we use the end of the unique_id | ||
| # to find the correct entity that will be readded later (the installation | ||
| # entity ends with '_is_required_authentication'). | ||
| _LOGGER.warning("Removing deprecated entity: %s", entity_id) | ||
| entity_registry.async_remove(entity_id) |
Collaborator
There was a problem hiding this comment.
Looks good. I wonder thou: Should we add to the comment of this one and the "operating_mode" that this added for the upgrade from "v0.7 -> v0.8"? This is useful information to have when this is reviewed in the future and the memory of why this code exists is forgotten.
Contributor
Author
There was a problem hiding this comment.
While git-blame does help with this, that is a VERY good point, will add.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
authentication_requiredinstead ofis_authorization_requiredsince that is part of the state update.Fixes (part of) #219