Hi! Not quite sure how to call this, hopefully this question hasn't been answered many times before.
I have MyStrom light bulbs. When asked for their current state they return payload.(mac address).(various variables) as in the picture above. I'm trying to generalize some functionalities for these bulbs, however, I am unsure how to deal with the mac address in a flexible way. For example I might like to copy some of the information in the variables to outside the payload for later usage, for which I might for example like to reference msg.payload.(mac address).on, something like this:
(I would use msg.restore to eventually make a call to the bulb to return it to its initial state, so I might for example blink it a few times if something happens and then return it to normal)
So if I would like to use this for multiple MyStrom bulbs and don't want to duplicate my code, using a subflow instead, I'd need to flexibly reference this mac address they give back as the name of the object under payload. Is this at all possible, or is there some other way to accomplish my goal?
Thanks!