stfnhmplr / node-red-contrib-homee

access the homee api with node-red
37 stars 8 forks source link

Device cannot be used in subflow with env vars #18

Closed sttts closed 3 years ago

sttts commented 3 years ago

I want to put a device into a subflow with NodeRed environment variables (name and id) in order to factor out the definition of devices of the same type.

NodeRed subflows can have env vars, and ${name} would access the name. The numerical field for the Id though does not allow a reference to a variable like ${id}.

Bildschirmfoto 2021-02-02 um 20 21 09
sttts commented 3 years ago

NodeRed has typed inputs nowadays. They would allow other values than constants.

stfnhmplr commented 3 years ago

I know about typed inputs, but haven't thought of using them for a simple numeric field until now. I find the use of subflows interesting in this context and will be happy to modify that.

stfnhmplr commented 3 years ago

I have just released a new beta version. Among other things, the changes (f71bc9ec025050d717556fe894766f618f306bc0) needed for the use of subflows are included there. When testing, please make sure that the attribute IDs are also defined via the ENV variables and must be unique across all devices.

I am happy to get feedback if it works as desired.

stfnhmplr commented 3 years ago

The requested functionality is now available in release 0.9.0. Therefore I will close this.