@anon43302295 Yes, beautifully simple but strangely, on reflection the solution by @pplucky might actually fit my application better.
And yes the docs are my friend but I sometimes have trouble getting those friends to come out to play. I don’t find the docs organisation always intuitive and It did not occur to me to look at the Input_boolean documentation to see how to use it in an automation. I learned more than one thing from this question.
I think the Automation documentation should have a note (near the top) to suggest looking at the docs for other components directly for further information.