Trigger when specific energy/power mode is activated (low/high/automatic)

Is it possible to trigger an action when a MacBook energy/power mode is engaged (say, switch from Low Power to Automatic)? This is announced in Console by various processes (chiefly the ControlCenter process) but, as far as I can tell, not issued as a distributed notification, nor is it included in BTT’s default/on-demand variables.

I could also do with a general “specific UI element was clicked” trigger + advanced trigger conditions, but again, I’m not aware that that exists. (Would be cool though!)

Anything I overlooked? Possible to implement as a native trigger?

Added in 6.353

However high-power mode might not always be detected correctly because the public API doesn't expose it yet and I haven't tried using the private apple frameworks.

The mode will also saved to variable power_mode

Works great. Thank you, again.