Hi!
I am using node-red-contrib-alexa-remote2 to control my Alexa Echo and connected Smart Home devices as a first useful way to explore Node-RED. It provices a Node (amongst others) to control a single Smart Home device. Let's have a look on how the Node properties look like if I wanted to turn my Kitchen light off.
Unfortunately there is no toggle, only allowing for turning a light on or off. I took this as an oppurtunity to get into subflows.
My idea is to create a subflow that takes the Account (global configuration node, as far as I understand) and device name or id. It consists of 3 Alexa nodes: The first one queries the current state of the target device (on / off). A switch node then either triggers the turn device on or turn device off node.
While I understand that I can use environment variables for subflow configuration, I don't understand how I could somehow inject those values into the Alexa Nodes, configuring the Account and device in a dynamic way.
Is there some API to access a Node's configuration and some init code of a subflow where I could do this?
Thanks in advance!