I've created an automation in BTT to run a Shortcut when my Mac goes to Sleep, but I can't find an option to set it to run only during a certain timeframe. Although I could add this condition inside Shortcuts, it would be more convenient if BTT had this feature built-in.
(There's another App on the AppStore called Shortery that has support for this very option and has other triggers like Focus Modes, Sunset/Sunrise, ..., but I like using BTT )
Good idea, I can add this as a default condition for the advanced trigger conditions.
For now you can create such a condition yourself.
Go to the Automations & Named & Other triggers section in BTT. Then add a new trigger with the type "Dynamic Variable (Java Script)". Give it a name, e.g. dynamic_current_hour
Use this as code to get the current hour:
const d = new Date();
let hour = d.getHours();
returnVariableValue(hour);