Hello,
I apologize for the question, because I know the answer is going to be simple. But, I have looked and looked and have not found it.
I have 20 fans in my house. I want to run each fan for 2 minutes a day. (Tropical climate)
So, I created a simple flow that:
a) checks to see if fan is running, and if not
b) runs fan for 2 minutes,
c) stops fan.
Simple. But I am using this in a subflow, and I want to pass the entity_id of the fan to the subflow.
So in the calling flow, I use the “Current State” node to check if it is running. The msg.payload from this is the name of the fan.
In the subflow I have an environment variable:
FAN_NAME
So, my question is, how do I pass msg.payload to the environment variable FAN_NAME?
I have tried a zillion combinations of $msg.payload, or {msg.payload} or {"{{msg.payload}}"} and all of these without the “msg.” (only payload), and nothing seems to work.
I suspect this answer is one line.
Many thanks