Skip to content

Add STATE_STANDBY to base media_player and fix state reporting issues#28897

Closed
ktnrg45 wants to merge 2 commits into
home-assistant:devfrom
ktnrg45:ps4-fix1
Closed

Add STATE_STANDBY to base media_player and fix state reporting issues#28897
ktnrg45 wants to merge 2 commits into
home-assistant:devfrom
ktnrg45:ps4-fix1

Conversation

@ktnrg45
Copy link
Copy Markdown
Contributor

@ktnrg45 ktnrg45 commented Nov 20, 2019

Description:

Add STATE_STANDBY to base media_player. Roku and PS4 already uses STATE_STANDBY.

Fixes issue for PS4 when the lovelace media_player card calls service turn_off when power button is pressed if state is standby. This PR is complimentary with home-assistant/frontend#4250, although the actual issue fix is dependent on it. Also fixes incorrect state reporting in Homekit and Universal.

  • Add STATE_STANDBY to base media_player.

  • Add STATE_STANDBY to Homekit

  • Add STATE_STANDBY to Universal

  • Also override base media_player.async_toggle for PS4.

Related issue (if applicable): fixes #28891

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

@ktnrg45 ktnrg45 changed the title [WIP] Fix issue with frontend lovelace media_player card calling service turn_off instead of turn_on [WIP] Fix issue with lovelace media_player card calling service turn_off instead of turn_on Nov 20, 2019
@ktnrg45 ktnrg45 changed the title [WIP] Fix issue with lovelace media_player card calling service turn_off instead of turn_on Fix issue with lovelace media_player card calling service turn_off instead of turn_on Nov 20, 2019
@ktnrg45 ktnrg45 marked this pull request as ready for review November 20, 2019 12:33
@ktnrg45 ktnrg45 changed the title Fix issue with lovelace media_player card calling service turn_off instead of turn_on [WIP] Fix issue with lovelace media_player card calling service turn_off instead of turn_on Nov 21, 2019
@ktnrg45 ktnrg45 changed the title [WIP] Fix issue with lovelace media_player card calling service turn_off instead of turn_on Fix issue with lovelace media_player card calling service turn_off instead of turn_on Nov 21, 2019
@ktnrg45 ktnrg45 changed the title Fix issue with lovelace media_player card calling service turn_off instead of turn_on Add STATE_STANDBY to base media_player and fix state reporting issues Nov 25, 2019
@balloob
Copy link
Copy Markdown
Member

balloob commented Dec 19, 2019

All changes to the entity component need to be proposed in the architecture repo as per the docs: https://developers.home-assistant.io/docs/en/entity_index.html#changing-the-entity-model

Going to close this and we can re-open if addition agreed upon.

@balloob balloob closed this Dec 19, 2019
@lock lock Bot locked and limited conversation to collaborators Dec 20, 2019
@ktnrg45 ktnrg45 deleted the ps4-fix1 branch June 21, 2020 22:13
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.

PS4 does not turn on with lovelace media card power button

4 participants