Ability to send MQTT alert of event/command being run

So I use IoTuring (GitHub - richibrics/IoTuring: Your Windows, Linux, macOS computer as MQTT and HomeAssistant integration), its an amazing app to automate my steam/HTPC with my receiver and TV. Since my/most computers don’t use CEC to turn the TV on and to the right input, I have home assistant automate this, using the trigger of being connected to the network. When its detected as “connected” to the network my tv/receiver turn on and the correct input is selected.

The shutdown is whats different, and I would like for it to turn off TV if the Sleep/shutdown command are triggered but before the shutdown command gets carried out, and when woken up from sleep, but not do anything when reboot command is given. Also for speed of triggering these events main. Thanks for any help.