Run Apple Script not working (Works in Script Editor)

Hi @Andreas_Hegenberg , thanks for making BTT amazing and pushing all the awesome features.

I'm trying to run this apple script via the "Run Apple Script (async)" action and the below script doesn't seem to work. I tested this code in ScriptEditor and works perfectly. Copy-pasting it in BTT doesn't work. Can you please help with this?

set batteryPercent to do shell script "pmset -g batt | awk '/InternalBattery/ { sub(/;/, \"\"); print $3 }' | sed 's/.$//'"
if (batteryPercent as integer) ≤ 51 then
	display notification with title "Battery Low: " & batteryPercent & "%"
end if

You must use: "Run Apple Script (blocked)"

Also, tried that (blocking), didn't work

Wait. Tried it now by creating a new action with blocking and its working for some reason. That's weird. Maybe I was doing something wrong.

The "Run Apple Script (async)" action runs in a background process. Therefore display notification can not work and changing the action type sometimes does not work properly. I also always take a new one and delete the old one.