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

Command for card to STOP playing in Home assistant #70

Open
novitibo opened this issue Nov 30, 2019 · 1 comment
Open

Command for card to STOP playing in Home assistant #70

novitibo opened this issue Nov 30, 2019 · 1 comment

Comments

@novitibo
Copy link

Hi,
Is there a way to refer one card to send to home assistant command to stop playing:
action:
- service: media_player.media_stop

What should be the trigger?
tnx

@novitibo novitibo changed the title Card read ... command STOP playing Card scan for command to STOP playing in Home assistant Nov 30, 2019
@novitibo novitibo changed the title Card scan for command to STOP playing in Home assistant Command for card to STOP playing in Home assistant Nov 30, 2019
@tmanternach
Copy link

I have a "next" card that I use, should work in a very similar way.

My card in magic-cards is Action: "Home Assistant" and the URI is just "next" (without quotes).

In Home Assistant, I have an Automation with a trigger type of Event. Event type is "magic_card_scanned". The event data is:

{ "card_type": "event", "card_uri": "next" }

The Action for this automation is pretty straight forward, but this is where yours would start to differ. My action type is "Call service", Service is "media_player.media_next_track. Service data is:

{ "entity_id": "media_player.spotify" }

I think you want "media_player.media_stop" for your Service. I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants