Halt if state is - how to use with flow variable?

I want to have some kind of service switch in my heating system.

This swich should disable any forced settings of my thermostates.

I can do a swich in HA, check its state and set variable in the flow. Is it possible to use it in pool state node in “halt if state is” filed? How can I do that?

I tired:

is flow.nameofvariable
is flow.nameofvariable=True
is flow.nameofvariable==True

I can do this check in the next step but this can be more elegant way. Is it possible?

Are you sure you want to use the Poll State node for that feature? I’d use a Current State node that checks an Input_boolean entity and “halt if: true” on that. No extra variables needed.

I check several input number fields at start this flow. I can check input boolean for service switch but I really don’t know (for now) how logically connect it with rest of the flow.

Maybe I schould redesign the flow but I still want to know what for are flow. and global. settings in “halt if” field.

[{"id":"4c1ccd9b.4301f4","type":"inject","z":"5eb3594f.d294b8","name":"","topic":"","payload":"above_horizon","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":1296,"wires":[["3f8772f4.6a1c3e"]]},{"id":"a4f4d9c.432c028","type":"inject","z":"5eb3594f.d294b8","name":"","topic":"","payload":"below_horizon","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":1328,"wires":[["3f8772f4.6a1c3e"]]},{"id":"3f8772f4.6a1c3e","type":"change","z":"5eb3594f.d294b8","name":"","rules":[{"t":"set","p":"sunState","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":378,"y":1328,"wires":[[]]},{"id":"8350076d.acf5c8","type":"poll-state","z":"5eb3594f.d294b8","name":"","server":"ef067c6f.620e6","updateinterval":"3","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"sun.sun","state_type":"str","halt_if":"sunState","halt_if_type":"flow","halt_if_compare":"is","outputs":2,"x":154,"y":1376,"wires":[["b6033df9.1935c"],["436e2514.64e6ac"]]},{"id":"b6033df9.1935c","type":"debug","z":"5eb3594f.d294b8","name":"Passed","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":364,"y":1376,"wires":[]},{"id":"436e2514.64e6ac","type":"debug","z":"5eb3594f.d294b8","name":"Halted","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":354,"y":1424,"wires":[]}]

Thanks :slight_smile: Now I know how i it works.