Automation with Firetv/Emby

I’d like to thank you for writing this, it’s really helped me wrap my head around accessing Emby’s API for the first time, and I don’t think I’d have been able to get my NFC tags working without this post.

One area I’m kind of getting stumped on is playing a random episode of a particular show.

I’m not using a drop-down or anything like what you’re using for your setup, but I have NFC tags that each play a certain title. So far I’ve limited myself to each tag playing a specific movie, but when it comes to TV shows, I’d like each tag to start playback of a particular show, but a random episode of said show.

What do you think would be the best way of going about this? I’d only need it to play a single episode and then stop until the tag is scanned again and then play another random episode of the same show.

EDIT:

I ended up figuring this out on my own, and it turned out to be much easier than I thought! All I had to do was find out the range of numbers for the ID’s of the episodes that I wanted and template them so a random episode would be chosen for show:

show: '{{ range(614262,614301)| random }}'