I would like to turn on/off some a wifi plug when my receiver exits/enters standby mode

hi,

i have a pioneer receiver, which eats ~1W when in standby. this is ok for me. i have a TV and a powered subwoofer that eat way more.

so my plan was to use the power state of the receiver as a trigger to switch on the other two via a wifi plug.

i can see the state changes of the receiver (via DLNA integration):

became unavailable
12:54:41 PM - 9 minutes ago
---
changed to Playing
12:54:18 PM - 11 minutes ago

etc - but this automation:

- alias: "tv on"
  trigger:
  - platform: "state"
    from: "unavailable"
    entity_id: "media_player.pioneer_receiver_2"
  action:
  - service: "switch.turn_on"
    target:
      device_id: "78ff24e73a34f305d69d9162f5304d40"
      entity_id: "switch.tv_switch"

does not trigger - any ideas why? is “unavailable” incorrect?

I would suggest you confirm state names in developer tools / states. Perhaps it is “idle” instead of “unavailable”?

the UI says if became “idle” is when i hit the remote and it wakes up from standby. is the any place where i can see the entire object’s state as structured data?

more detail: if it is in standby, ha says it’s “unavailable”, then when i turn it “on”, it changes to “idle” or “playing” (if media is played, which i normally dont do - media comes from an hdmi source, not from dlna)