I'm very new to this and I am currently reading lots of learning resources to get up to speed. One thing I have noticed (and which has me slightly concerned about Node-RED's suitability for me) is that all the examples and tutorials I have seen are very hard-coded in terms of the connections between specific devices. For example, a simple lighting example has 'Living room light switch' connected to 'Living room light'.
Is it possible to describe flows in a more generic manner? I.e. I would like a generic flow that describes how a 'light switch' and a 'light' interact, and then I'd like to be able to associate individual light switches with their corresponding light. I might have dozens of instances of this 'switch and light' flow and it would seem rather onerous to hard-code each relation in the flow itself.
If this is possible, can someone please point me at some relevant examples, tutorials or videos?