AppleTV not triggering automations when turned on/off/sleep

I’ve got AppleTV automations working fantastically when pausing/playing a movie (it brings the house lights up/down whenever you pause/play the movie), but am unable to get automations to trigger for any of the other options, such as turned off/turned on/becomes idle. I also see that “Apple TV turned on” appears twice in the popup.

Has anyone else successfully implemented AppleTV automations for these other triggers?

Are you using device triggers or state triggers?

If state triggers, make sure you use the state from Developer Tools / States page. The Lovelace frontend can change the way these states are displayed.

Also for the states off and on they must be quoted.

It’s not supported as power management is not in place (nor stable) yet.

I was using device triggers. I’ll try state triggers next. Right now it says it’s idle, but I’m not sure what string to use for the “from” field in the trigger – is it ok to leave that blank?

Yes it can be blank

Apple TV dont have off or sleep state. When sleep it shown as idle and stop playing while browsing also shown as idle, so can not have a “shutdown” automation base on this state. I use HDMI-CEC integration in HA which create switch.hdmi_4 which shown as off when apple tv sleep and on when awakes, use for automation.

Thank you, does HDMI-CEC require that the Raspberry Pi be plugged directly into the AppleTV, to sense the HDMI changes?

No, eg Apple TV in HDMI port 1 of the TV, and Raspberry Pi in HDMI port 2. the HA will detect switch.hdmi_0 and switch.hdmi_2

also for newer version of HASSIO you might need this plug in