Automation on offline device event (bonus: postpone)

Hi there.
I’m having a puzzle question that I can’t find a clue in the doc.
I have set up my mediaplayer in the living room. With automatic suspend on set time.
But to push things further, and spare some electricity, I added a smart socket to it (among a bunch of other devices) to shut it off at night.
I was wondering, since I have all sort of remotes which can control it, can I use these to wake the socket up, and wait the media player to be online.
I was hoping someting like:

Catch Event supposed to be send to said MediaPlayer
If Socket Off
Wake Socket Up
Repost The Event

Is that even doable?
Thank all in advance

Are the remotes integrated into HA?

If not I’m not sure how it would possible if HA doesn’t even know the remote exists.

If yes then just use the remote input to HA to trigger an automation

Hey @finity
Yes, they are zigbee ikea remotes integrated with zigbee2mqtt.
The thing is there are like at least 2 buttons to each remotes to control something on the mediaplayer.
That would make like 9 triggers. Doable but I was wondering if a better way existed.

I can’t think of any.

Sometimes things are just a bit complicated… :wink: :laughing:

I guess depending on the remotes and how you have them identified you might be able to template them and simplify/shorten the trigger a bit.