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

Cleanup of state handling in webostv #30416

Merged
merged 2 commits into from
Jan 3, 2020

Conversation

bendavid
Copy link
Contributor

@bendavid bendavid commented Jan 2, 2020

Breaking Change:

Entity will have STATE_ON when tv is on instead of STATE_PLAYING or STATE_PAUSED as was previously the case. Users will need to update automations that depend on entity state.

Description:

Now that the tv state is updated with asynchronous callbacks, there is no need to directly manipulate the state variables when calling commands. Since the currently known methods cannot distinguish between play and pause states, and the pause command anyways acts as a play-pause toggle, the state handling is further simplified by replacing STATE_PLAYING/STATE_PAUSED with simply STATE_ON, with the advantage that it is no longer possible to go out of sync with the actual state of the tv.

@MartinHjelmare
Copy link
Member

Looks good!

@MartinHjelmare MartinHjelmare merged commit 4c6e10a into home-assistant:dev Jan 3, 2020
@lock lock bot locked and limited conversation to collaborators Jan 4, 2020
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.

3 participants