May I ask what node used for "state continued" and how to set it?

I use "get entities" to get the number of devices in the same state for automation!

If it is equal to 0, turn off the light, if it is greater than 0, turn on the light

However, the device is not stable and jumping around. I hope to have a node can makesure that the state 0 has keep for 5 minutes or more. Then pass.

Can someone help me? please

Thanks!

You could possibly use a trigger node combined with a switch node to filter betwen state 0 and greater, if greater send msg reset to the trigger, then send latest payload after 5 mins

This will have a problem, the trigger can only receive greater, when the state changes the trigger does not know.

Can you please give me a example?

Would be helpful if you supplied examples of the incoming data, but to guess i would think something like this.

[{"id":"932b6c8.9517f9","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":120,"y":3620,"wires":[["12917235.b92ee6"]]},{"id":"12917235.b92ee6","type":"switch","z":"bf9e1e33.030598","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":260,"y":3640,"wires":[["23ac18a8.48ff98"],["39b76aea.15f0e6"]]},{"id":"85624c72.86a75","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":130,"y":3660,"wires":[["12917235.b92ee6"]]},{"id":"23ac18a8.48ff98","type":"trigger","z":"bf9e1e33.030598","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":470,"y":3620,"wires":[["d75462a8.4fb38"]]},{"id":"39b76aea.15f0e6","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":3680,"wires":[["23ac18a8.48ff98","6b19140d.17a95c"]]},{"id":"d75462a8.4fb38","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":3620,"wires":[["6b19140d.17a95c"]]},{"id":"6b19140d.17a95c","type":"rbe","z":"bf9e1e33.030598","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","x":850,"y":3680,"wires":[["838111ef.f0b218"]]},{"id":"838111ef.f0b218","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":3820,"wires":[]}]

[edit] added fuller example

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.