Skip to content

Commit

Permalink
Add configuration for magic cards
Browse files Browse the repository at this point in the history
  • Loading branch information
TribuneX committed Dec 8, 2018
1 parent 29a4642 commit 8a3d428
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions automation/media/magic_cards.yaml
@@ -0,0 +1,23 @@
- alias: Play playlist from Magic Cards
trigger:
- platform: event
event_type: magic_card_scanned
event_data:
card_type: playlist
action:
- service: media_player.select_source
data_template:
entity_id: "media_player.living_room"
source: "{{ trigger.event.data.card_uri.split('|')[1] }}"

- alias: Play song from Magic Cards
trigger:
- platform: event
event_type: magic_card_scanned
event_data:
card_type: song
action:
- service: media_player.select_source
data_template:
entity_id: "media_player.living_room"
source: "{{ trigger.event.data.card_uri.split('|')[1] }}"

0 comments on commit 8a3d428

Please sign in to comment.