I am trying to create an automation to launch different scenes depending on what is playing on my android tv. I use the Android ADB integration to fetch the data. I want to create a longer list of apps with some more elif but this is just a start.
You don’t need a template trigger, change the teigger to this:
trigger:
platform: state
entity_id: media_player.android_tv_2
to: 'playing'
also data_template: can be changed to data:, and are there other possible apps for the android tv then the two in your automation? You need an else clause there.
Thats a nice solution and also cuts down the automation, but i was specifically looking for something as to triggering depending on the source within 1 automation.
I don’t understand what you mean, my trigger is exactly the same as yours (if it were a correct template).
Also the template in your action is missing entity_id.
Another solution would be a mapper, some thing like this: