Skip to content

Add new optional parameter for ConfigEntries.async_entries to specify whether or not ignored entries should be included#34298

Closed
raman325 wants to merge 3 commits intohome-assistant:devfrom
raman325:update_async_entries
Closed

Add new optional parameter for ConfigEntries.async_entries to specify whether or not ignored entries should be included#34298
raman325 wants to merge 3 commits intohome-assistant:devfrom
raman325:update_async_entries

Conversation

@raman325
Copy link
Copy Markdown
Contributor

@raman325 raman325 commented Apr 16, 2020

Proposed change

In fixing an issue with the vizio integration I thought it would be nice if the async_entries function could return only non-ignored config entries so that other integrations do not have to build custom logic like vizio has. This change adds an optional additional parameter to the function that will optionally filter ignored config entries out. The default is set to make this change backwards compatible.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

…whether or not ignored entries should be included
@balloob
Copy link
Copy Markdown
Member

balloob commented Apr 16, 2020

I don't think that it's a good idea. We shouldn't ignore ignored entries in our checks if things are already set up .

@raman325
Copy link
Copy Markdown
Contributor Author

It's useful for my case where I am iterating through config entries to check for the existence of keys that wouldn't exist on an ignored entry, but I can close this if you don't think this is a problem for other integration

@balloob
Copy link
Copy Markdown
Member

balloob commented Apr 16, 2020

Let's not add it to the main object.

@balloob balloob closed this Apr 16, 2020
@raman325 raman325 deleted the update_async_entries branch April 16, 2020 22:58
@lock lock Bot locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants