Here is a workaround you could use.
Create a Task to toggle torch ( alternatively get a TeslaLED plugin -it supports a lot of devices).
I am not sure if this is my device limitation but the Hardware state is only limited to media button and not power button but nevertheless I believe the outcome will be the same.
State >> Hardware >> Media button (Check both held down and stop event)
Task 1 (entrance) You can name it TorchlightCtrl or anything.
A1 Alert >> Torch
A2 Alert >> Flash (text: "Flashlight ON" Enabled Long: On)
A3 Alert >> Notify (e.g Torchlight Enabled)
Save and exit this Task
Create another task
Task 2 (exit)
A1: Alert >> Notify Cancel (title: Torchlight Enabled)
Press back to exit
A2 Task >> Stop (Put the task created earlier -in this case TorchlightCtrl)
Explanation: Pressing the media button will trigger Task 1 (TorchlightCtrl) to flash the torch, and a persistent notification is displayed in the notification bar.
Dismissing the notification will trigger Task 2 which stops Task 1, additionally turning off the trigger.
Unfortunately my device Camera light is not working so could not expiclitly test it, please give me feedback if it works or not, so I can further improve it. Cheers