I'm using node-red-contrib-sun-position to control my roller blinders. I need to pass blinder position to the node if I use the manual commands. To do this, I'm using this example flow to:
1- get current position but only the number.
2- block repeated messages so that it doesn't reset blinder node
3- pass it to blinder control node
It works but, is there a simpler or more correct(beautiful) way of doing it?
[{"id":"6d541357a13be106","type":"poll-state","z":"c807ae25c9316897","name":"Posi","server":"e1926eef.58258","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"1","updateIntervalType":"num","updateIntervalUnits":"hours","outputinitially":false,"outputonchanged":true,"entity_id":"cover.cozinha1","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":210,"y":900,"wires":[["da4bce5497b4c17d"]]},{"id":"da4bce5497b4c17d","type":"change","z":"c807ae25c9316897","name":"Data","rules":[{"t":"set","p":"payload","pt":"msg","to":"data.attributes.current_position","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":900,"wires":[["986f54b992dc39a9"]]},{"id":"3d354d9cea62dd46","type":"debug","z":"c807ae25c9316897","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":900,"wires":[]},{"id":"986f54b992dc39a9","type":"rbe","z":"c807ae25c9316897","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":490,"y":900,"wires":[["3d354d9cea62dd46"]]},{"id":"e1926eef.58258","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]