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

Mediaplayer card sending "media_play_pause" instead of "media_stop" #6097

Closed
3 tasks done
mvdwetering opened this issue Jun 3, 2020 · 2 comments
Closed
3 tasks done
Labels
Bug Current Bug in UI - Extra Attention stale

Comments

@mvdwetering
Copy link
Contributor

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

The problem

I am working on a mediaplayer that supports only Play and Stop as media commands, this is indicated in the supported features. The mediaplayer card renders a Play button (right arrow) when the entity is idle, and a Stop button (square) when the entity is playing. So far so good.

However when pressing the Stop button on the card the "media_play_pause" service is called instead of "media_stop". This causes the Stop command to not work.

This is the request as seen on the websocket when pressing the Stop button.
{"type":"call_service","domain":"media_player","service":"media_play_pause","service_data":{"entity_id":"media_player.fightclub"},"id":26}

Expected behavior

When pressing the Stop button on the mediaplayer card the "media_stop" service is called.

Steps to reproduce

Probably not really useful as I don't know of other media_players that only support Stop (not Pause). If needed I can build a demo mediaplayer that only has play/stop without needing the actual mediaplayer hardware.

1. Add a mediaplayer that supports only Stop and Play (not Pause)
2. Navigate to Lovelace
3. Click Play, media_play service is called
4. Wait until entity is playing
5. Click Stop, media_play_pause is called

Environment

  • Home Assistant release with the issue: 0.110.4
  • Last working Home Assistant release (if known): Don't know
  • Browser and browser version: Chrome 83.0.4103.61
  • Operating system: WSL2 on Windows 10 and Home Assistant on RPi3

State of relevant entities

UI is showing OK.

Problem-relevant configuration

Not sure what is expected.

Javascript errors shown in your browser console/inspector

No javascript errors or other errors in the HA log

Additional information

None

@mvdwetering mvdwetering added the Bug Current Bug in UI - Extra Attention label Jun 3, 2020
@stale
Copy link

stale bot commented Sep 2, 2020

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@olalid
Copy link

olalid commented Sep 17, 2020

The same problem is present on 0.114.4.
When using a media_player device that only supports stop service, the UI displays a stop button, but when it is pressed the following can be seen on the web socket:

{"type":"call_service","domain":"media_player","service":"media_play_pause","service_data":{"entity_id":"media_player.h_hobbyrum"},"id":34} 1600375411.2567565

@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Current Bug in UI - Extra Attention stale
Projects
None yet
Development

No branches or pull requests

2 participants