core: MediaPlayer:Toggle does not turn Off Cast devices

The problem

When using the MediaPlayer:Toggle service with a Cast media_player it does turn On, but when calling MediaPlayer:Toggle again it does not turn Off

When watching with the developer tools I see the following:

  • Cast media_player has state Off, frontend shows player is Off (gray card, no title or play button)
  • Call MediaPlayer:Toggle on the Cast media_player
  • State changes to Idle, frontend shows media_player is active (colored card, additional controls like play button became visible)
  • Call MediaPlayer:Toggle on the Cast media_player
  • State stays Idle, no errors in the log, no change in frontend

What version of Home Assistant Core has the issue?

core-2022.8.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Cast

Link to integration documentation on our website

https://www.home-assistant.io/integrations/cast/

Diagnostics information

Does not support diagnostics it seems

Example YAML snippet

I am using the UI mode for calling the service, but this is what it shows when switching to YAML mode:

service: media_player.toggle
data: {}
target:
  entity_id:
    - media_player.googlehome7482

Anything in the logs that might be useful for us?

No errors

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Doesn’t turn off TV (only switches the HA and Chromecast wallpaper). Works like the ‘Cast’ button.