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