Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103050

Automation for Playing Music (Spotify) by Scanning a RFID Card through Magic Cards Project

$
0
0

Having problem creating an automation which reads the data from the scanned card and pass it on to media_player.spotify_poras_chaudhary to play the relevant song from Spotify URI.

I’m running the Magic Cards Project on a raspberry pi and using an RFID card scanner to scan the cards.

When I scan a card I get the following data in the “magic_card_scanned” event -

Event 0 fired 1:39 PM:
{
    "event_type": "magic_card_scanned",
    "data": {
        "card_code": "0000314284",
        "card_type": "album",
        "card_arturl": "https://i.scdn.co/image/ab67616d0000b2734e2aa94e199e50bc8e10646f",
        "card_title": "Dil Se (Original Motion Picture Soundtrack)",
        "card_subtitle": "A.R. Rahman",
        "card_uri": "spotify:album:54NUwj7U1MOhA1ZGbnhiMz",
        "magic_cards_room": "Office"
    },
    "origin": "REMOTE",
    "time_fired": "2022-05-02T08:09:12.793694+00:00",
    "context": {
        "id": "43fc5c85a55945c08e686ae244ce4c6a",
        "parent_id": null,
        "user_id": "dd676a1912a24e2dab3d42cedda30267"
    }
}

Now, what should be my automation to play a song based on the data captured from the event?
my media player is: media_player.spotify_poras_chaudhary

Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>