Skip to content

Cleanup and simplitfy the async state update#9390

Merged
pvizeli merged 2 commits into
home-assistant:devfrom
pvizeli:improve_code
Sep 12, 2017
Merged

Cleanup and simplitfy the async state update#9390
pvizeli merged 2 commits into
home-assistant:devfrom
pvizeli:improve_code

Conversation

@pvizeli
Copy link
Copy Markdown
Member

@pvizeli pvizeli commented Sep 11, 2017

Description:

Simplify the code with a async version of schedule_update_ha_state.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

Comment thread tests/helpers/test_entity.py Outdated
mock_entity.async_schedule_update_ha_state(True)
yield from hass.async_block_till_done()

assert mock_call.called
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 'mock_call'

@pvizeli pvizeli merged commit 90f9a6b into home-assistant:dev Sep 12, 2017
@pvizeli pvizeli deleted the improve_code branch September 12, 2017 08:01
@balloob balloob mentioned this pull request Sep 22, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants