Can I tie an avr input selection to an automation?

For instance whether the avr is on or off if I select either the apple TV or bluray player input on the avr and have the lights dim. Then when I press play have the lights turn off. Then when I press pause or stop have the lights dim or come back on. I’ve seen YouTube videos of similar setups but I don’t really know how to get it going.

My equipment:
Sony a9g
Sony ubp x700
Anthem mrx1120
Urc MX990
Fios tv one
Apple TV 4k (tvos13 I know I know…)
Philips hue lights with bridge and Aurora dimmer switch
RIP 4b 2gb running haas
Windows 10 with rasbian virtual environment on virtualbox
Samsung note 8

I’m aware of the apple TV issues and that’s another story. My tv and receiver would not integrate. The tv only shows up as a Google cast that is always unavailable. Once I integrated homekit and homebridge the receiver and tv showed up as entities. I now have a fully functioning set of automations that turn on off the lights based on time and location and also if I turn on the receiver. So now how do I add play pause and stop automations?