Just discovered this thread: Custom component to declare/set variables
It may be exactly what I’m looking for.