Use attribute: app_name as trigger

Hi,
I want to send a wake_on_lan when I start Plex om my google TV. I use this trigger but can’t get It to work.

  - platform: state
    entity_id: media_player.chromecastultra9572
    attribute: app_name
    to: "com.plexapp.android"

No automation traces?
If so, please show the state of media_player.chromecastultra9572 when plex is in the foreground.

Skärmavbild 2024-02-11 kl. 15.51.37

No automation traces?
You realize the automation will only trigger when the frontend app will change to plex, not if it already is, right?

My bad. There was no problem with the trigger. The problem was in the service. I tried to use a picture that wasn’t available.