Light off depending on tv app in use

Hey legends.

I am trying to get the theatre room lights sorted.

I am hoping to have them turn off when the streaming is launched rather than the tv turning on.
Im not sure how to use the app as a trigger.

the below screen grab is for one of the apps i would like to use as the trigger for the lights turning off.

Hi Jake, if you go to the Developer tools
Open your Home Assistant instance and show your state developer tools.
you can see all the entities with their attributes.
From there you can see what you can use as a trigger for your automation.

Here King, you dropped this :crown:

1 Like

this is the basic off the code. I will change it to off, just put a red light to see if it worked when switching apps.

It does!

alias: test - kayo
description: ""
triggers:
  - trigger: state
    entity_id:
      - media_player.theatre_room_tv
    attribute: app_id
    to: au.com.kayosports.tv
conditions: []
actions:
  - action: light.turn_on
    metadata: {}
    data:
      rgb_color:
        - 151
        - 2
        - 2
    target:
      entity_id: light.theatre_room_ceiling_light_light
mode: single

1 Like