When AndroidTV on, start light

Hi
I have the ADB link to my AndroidTV (Nvidia Shield)
But i’m having trouble finding the right way to make this work;
If AndroidTV starts, turn on a specific light

I would really like to learn how to write the code myself, but I find yaml a bit hard to understand and learn. So I was woundering if someone could help me out?

This is the basic idea:

trigger:
  - platform: state
    entity_id: media_player.android_tv # replace with your tv entity
    to: 'on'
action:
  - service: light.turn_on
    entity_id: light.your_light
1 Like