And the code for the flow:
[{"id":"e4404b5a58c7758d","type":"subflow","name":"Check Blind Position","info":"","category":"","in":[{"x":60,"y":180,"wires":[{"id":"897888510dc151cd"}]}],"out":[{"x":800,"y":186,"wires":[{"id":"48faf93fff97f92c","port":0}]}],"env":[],"meta":{},"color":"#DDAA99"},{"id":"897888510dc151cd","type":"delay","z":"e4404b5a58c7758d","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":180,"y":180,"wires":[["f482ee45950fe582"]]},{"id":"f482ee45950fe582","type":"api-render-template","z":"e4404b5a58c7758d","name":"Get Blind Position","server":"c879ac61.99cd1","version":0,"template":"{{states.cover.kitchen_blind_1.attributes.current_position}}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":350,"y":180,"wires":[["16f9f54f3fe56536"]]},{"id":"16f9f54f3fe56536","type":"switch","z":"e4404b5a58c7758d","name":"Correct?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"$round($round($number(msg.blind_position) * 0.99, 0) / 0.99,0)\t\t","vt":"jsonata"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":520,"y":180,"wires":[["d09c19f9cf4617a2"],["48faf93fff97f92c","ec5040387dbd38c7"]]},{"id":"48faf93fff97f92c","type":"repeat","z":"e4404b5a58c7758d","name":"Retry","repetitions":"3","elseOutput":false,"outputs":1,"x":690,"y":186,"wires":[[]]},{"id":"d09c19f9cf4617a2","type":"debug","z":"e4404b5a58c7758d","name":"EQUAL","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":699,"y":134,"wires":[]},{"id":"ec5040387dbd38c7","type":"debug","z":"e4404b5a58c7758d","name":"OTHERWISE","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":720,"y":240,"wires":[]},{"id":"19d1bb3f.299195","type":"comment","z":"b896509c.caf71","name":"Blinds","info":"","x":70,"y":600,"wires":[]},{"id":"c3587cd4.d3c1e","type":"api-call-service","z":"b896509c.caf71","name":"Living Room","server":"c879ac61.99cd1","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.living_room_blind","data":"{\"position\":$number(msg.blind_position)}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":860,"wires":[["8c4e42902073be9f"]]},{"id":"4505ad6d.68ab04","type":"api-call-service","z":"b896509c.caf71","name":"Bedroom","server":"c879ac61.99cd1","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.bedroom_blind","data":"{\"position\":$number(msg.blind_position)}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":980,"wires":[["3f226a6cfb53d32e"]]},{"id":"b489f1f5.da4d1","type":"api-call-service","z":"b896509c.caf71","name":"Patio Door","server":"c879ac61.99cd1","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.patio_door_blind","data":"{\"position\":$number(msg.blind_position)}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":920,"wires":[["1e6194637bee0de1"]]},{"id":"300b7047.4261f","type":"api-call-service","z":"b896509c.caf71","name":"Kitchen 1","server":"c879ac61.99cd1","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kitchen_blind_1","data":"{\"position\":$number(msg.blind_position)}\t\t","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":680,"wires":[["6207d2c84c2ab1ac"]]},{"id":"ad4acba.115ff38","type":"api-call-service","z":"b896509c.caf71","name":"Kitchen 2","server":"c879ac61.99cd1","version":3,"debugenabled":true,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kitchen_blind_2","data":"{\"position\":$number(msg.blind_position)}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":900,"y":740,"wires":[["3570d0062dc49826"]]},{"id":"a57e94e.dc38668","type":"api-call-service","z":"b896509c.caf71","name":"Kitchen 3","server":"c879ac61.99cd1","version":3,"debugenabled":true,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kitchen_blind_3","data":"{\"position\":$number(msg.blind_position)}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":800,"wires":[["ede06f423f789daf"]]},{"id":"d034a643.b08148","type":"server-state-changed","z":"b896509c.caf71","name":"Night mode","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.night_mode","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"2","forType":"num","forUnits":"minutes","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":840,"wires":[["192cb3d4.e8d5ec","f909b0a5.59cbc","2993a319.3c493c","5c63763f.038ff8","b0e9e032.649d8","6ebd5058.3a69c"],["9791eff1.376b4"]]},{"id":"1ca044c7.1e9d9b","type":"api-current-state","z":"b896509c.caf71","name":"Away?","server":"c879ac61.99cd1","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is_not","entity_id":"person.daniel_brunt","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":1040,"wires":[["4505ad6d.68ab04"],["37aee048.230d2"]]},{"id":"37aee048.230d2","type":"api-current-state","z":"b896509c.caf71","name":"Awake?","server":"c879ac61.99cd1","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.sleep_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":780,"y":1100,"wires":[["4505ad6d.68ab04"],[]]},{"id":"192cb3d4.e8d5ec","type":"api-current-state","z":"b896509c.caf71","name":"Preset","server":"c879ac61.99cd1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.kitchen_blind_1","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"blind_position","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":680,"wires":[["300b7047.4261f"]]},{"id":"f909b0a5.59cbc","type":"api-current-state","z":"b896509c.caf71","name":"Preset","server":"c879ac61.99cd1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.kitchen_blind_2","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"blind_position","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":740,"wires":[["ad4acba.115ff38"]]},{"id":"2993a319.3c493c","type":"api-current-state","z":"b896509c.caf71","name":"Preset","server":"c879ac61.99cd1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.kitchen_blind_3","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"blind_position","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":800,"wires":[["a57e94e.dc38668"]]},{"id":"5c63763f.038ff8","type":"api-current-state","z":"b896509c.caf71","name":"Preset","server":"c879ac61.99cd1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.living_room_blind","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"blind_position","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":860,"wires":[["c3587cd4.d3c1e"]]},{"id":"b0e9e032.649d8","type":"api-current-state","z":"b896509c.caf71","name":"Preset","server":"c879ac61.99cd1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.patio_door_blind","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"blind_position","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":920,"wires":[["b489f1f5.da4d1"]]},{"id":"6ebd5058.3a69c","type":"api-current-state","z":"b896509c.caf71","name":"Preset","server":"c879ac61.99cd1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.bedroom_blind","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"blind_position","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":980,"wires":[["1ca044c7.1e9d9b"]]},{"id":"9791eff1.376b4","type":"change","z":"b896509c.caf71","name":"Pos 97","rules":[{"t":"set","p":"blind_position","pt":"msg","to":"97","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":660,"wires":[["300b7047.4261f","ad4acba.115ff38","a57e94e.dc38668","c3587cd4.d3c1e","b489f1f5.da4d1","4505ad6d.68ab04"]]},{"id":"a0db05c.b4c34f8","type":"server-state-changed","z":"b896509c.caf71","name":"Bedroom Tilt","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.bedroom_blind","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":980,"wires":[["6ebd5058.3a69c"]]},{"id":"b9781341.340e2","type":"server-state-changed","z":"b896509c.caf71","name":"Patio Door Tilt","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.patio_door_blind","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":920,"wires":[["b0e9e032.649d8"]]},{"id":"57ca697f.0a3588","type":"server-state-changed","z":"b896509c.caf71","name":"Living Room Tilt","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.living_room_blind","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":520,"y":860,"wires":[["5c63763f.038ff8"]]},{"id":"ee537a6a.1b15d8","type":"server-state-changed","z":"b896509c.caf71","name":"Kitchen 1 Tilt","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.kitchen_blind_1","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":680,"wires":[["192cb3d4.e8d5ec"]]},{"id":"f425853d.fa8398","type":"server-state-changed","z":"b896509c.caf71","name":"Kitchen 2 Tilt","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.kitchen_blind_2","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":740,"wires":[["f909b0a5.59cbc"]]},{"id":"4a29f1ee.75fff","type":"server-state-changed","z":"b896509c.caf71","name":"Kitchen 3 Tilt","server":"c879ac61.99cd1","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.kitchen_blind_3","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":800,"wires":[["2993a319.3c493c"]]},{"id":"6207d2c84c2ab1ac","type":"subflow:e4404b5a58c7758d","z":"b896509c.caf71","name":"Check","env":[],"x":1050,"y":680,"wires":[["300b7047.4261f"]]},{"id":"3570d0062dc49826","type":"subflow:e4404b5a58c7758d","z":"b896509c.caf71","name":"Check","env":[],"x":1050,"y":740,"wires":[["ad4acba.115ff38"]]},{"id":"ede06f423f789daf","type":"subflow:e4404b5a58c7758d","z":"b896509c.caf71","name":"Check","env":[],"x":1050,"y":800,"wires":[["a57e94e.dc38668"]]},{"id":"8c4e42902073be9f","type":"subflow:e4404b5a58c7758d","z":"b896509c.caf71","name":"Check","env":[],"x":1050,"y":860,"wires":[["c3587cd4.d3c1e"]]},{"id":"1e6194637bee0de1","type":"subflow:e4404b5a58c7758d","z":"b896509c.caf71","name":"Check","env":[],"x":1050,"y":920,"wires":[["b489f1f5.da4d1"]]},{"id":"3f226a6cfb53d32e","type":"subflow:e4404b5a58c7758d","z":"b896509c.caf71","name":"Check","env":[],"x":1050,"y":980,"wires":[["4505ad6d.68ab04"]]},{"id":"a4b5e81fc8bf4f77","type":"ha-button","z":"b896509c.caf71","name":"Night Mode On","version":0,"debugenabled":false,"outputs":1,"entityConfig":"6f4289fef8fe0216","outputProperties":[{"property":"payload","propertyType":"msg","value":"true","valueType":"bool"}],"x":100,"y":660,"wires":[["253dcc6e7e31a7b3"]]},{"id":"d884f8c2cf07c727","type":"ha-button","z":"b896509c.caf71","name":"Night Mode Off","version":0,"debugenabled":false,"outputs":1,"entityConfig":"ad2d0beb111a89a5","outputProperties":[{"property":"payload","propertyType":"msg","value":"true","valueType":"bool"}],"x":100,"y":700,"wires":[["65245e56b9a8aa71"]]},{"id":"253dcc6e7e31a7b3","type":"ui_button","z":"b896509c.caf71","name":"Close","group":"7637eac1.3e08b4","order":5,"width":0,"height":0,"passthru":true,"label":"Close Blinds","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":250,"y":660,"wires":[["9791eff1.376b4"]]},{"id":"65245e56b9a8aa71","type":"ui_button","z":"b896509c.caf71","name":"Open","group":"7637eac1.3e08b4","order":5,"width":0,"height":0,"passthru":true,"label":"Open Blinds","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":250,"y":700,"wires":[["192cb3d4.e8d5ec","f909b0a5.59cbc","2993a319.3c493c","5c63763f.038ff8","b0e9e032.649d8","6ebd5058.3a69c"]]},{"id":"c879ac61.99cd1","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"},{"id":"6f4289fef8fe0216","type":"ha-entity-config","server":"c879ac61.99cd1","name":"Close Blinds","version":2,"haConfig":[{"property":"name","value":"Close Blinds"},{"property":"icon","value":""},{"property":"device_class","value":""}],"entityType":"button"},{"id":"ad2d0beb111a89a5","type":"ha-entity-config","server":"c879ac61.99cd1","name":"Open Blinds","version":2,"haConfig":[{"property":"name","value":"Open Blinds"},{"property":"icon","value":""},{"property":"device_class","value":""}],"entityType":"button"},{"id":"7637eac1.3e08b4","type":"ui_group","name":"Triggers","tab":"f1b3c4b9490cc675","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"f1b3c4b9490cc675","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]