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

Default should_poll to False if assumed_state is True #14229

Closed
wants to merge 1 commit into from

Conversation

balloob
Copy link
Member

@balloob balloob commented May 1, 2018

Description:

Mini PR: if an entity has assumed_state = True, we should default should_poll to False.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@balloob balloob requested a review from a team as a code owner May 1, 2018 19:51
@homeassistant homeassistant added cla-signed core small-pr PRs with less than 30 lines. labels May 1, 2018
@balloob balloob mentioned this pull request May 1, 2018
8 tasks
Copy link
Member

@OttoWinter OttoWinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a quick look through all uses of assumed_state. In all cases, should_poll is set manually overridden anyway. Or, when assumed_state = True, there's no [async_]update method, so no polling needed. 👍

@amelchio
Copy link
Contributor

amelchio commented May 1, 2018

So would it be a good idea to remove those should_poll while at it?

@balloob
Copy link
Member Author

balloob commented May 2, 2018

Let me go and remove all the should_poll properties and make sure it works.

@balloob
Copy link
Member Author

balloob commented May 2, 2018

I found too many confusing places that I don't feel comfortable with this change anymore. Let's just keep it as it was. Makes it more predictable.

@balloob balloob closed this May 2, 2018
@balloob balloob deleted the entity-should-poll-default branch May 2, 2018 18:13
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed core small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants