OK ... I finally got it ... two profiles ...
PowerState - sets the power state on a variable
ExternalPower uses the state to do what you want.
Profile: PowerState
State: Power [ Source:Any ]
Enter: Anon
A1: Variable Set [ Name:%HavePower To

n Do Maths:Off Append:Off ]
Exit: Anon
A1: Variable Set [ Name:%HavePower To

ff Do Maths:Off Append:Off ]
Profile: ExternalPower
State: Not Power [ Source:Any ]
Enter: Anon
A1: Wait [ MS:0 Seconds:0 Minutes:10 Hours:0 Days:0 ]
A2: If [ %HavePower ~ off ]
A3: Flash [ Text

ower is Off Long:Off ]
A4: End If
You would need to replace the Flash command with whatever you do to power off.
... Thom