I use the combination of an automation and a script to turn on my kitchen lights (triggered by a motion sensor) when it’s dark or not sunny and the lights haven’t been turned on manually. The script turns on the lights, waits for the motion sensor to turn off, then waits another 10 minutes before turning the lights off. The script uses mode: restart so that the lights stay on until there is no movement for 10 minutes.
I’d like to turn this into a blueprint so that I can reuse it elsewhere, but unless I’m mistaken a blueprint can either be for an automation or for a script?
Do I need to re-implement this just within an automation in order to create a blueprint?
Automation BP or Script BP is true, sort of.
A BP Automation can certainly call a script or even a script BP and you can pass variables to the script or script BP so they can act on specific data.
Unrelated to your question but do you know a way to turn an existing automation into a blueprint? (short of recreating the blueprint manually following the logic of an automation)
I’ve never done blueprints but have an automation I would like to reuse (and then expand it to cover more cases)
Get what you want working, automation, script, or both, then make the blueprint out of that by adding the !inputs and variables and such.
Try to avoid device triggers and selectors. You can make them work, but people tend to struggle with those when dealing with them outside of the GUI editor context.