Hello. I have setup a Node-RED automation to schedule closing and opening my window covers. I created some helpers to be able to enter a time for closing and opening them in my Lovelace Dashboard. Also I created some switches (input_bolean helpers) to activate and deactivate closing / opening automatically. For the scheduling part I used the schedex node. This works pretty fine so far.
Now I want to be able to set the position instead of closing or opening them entirely. So I created another helper to adjust the position via a slider in LL. Works fine, too. But what I’m struggling with is how I can schedule to emit the position as schedex only emits off an on.
Any ideas?
[{"id":"78e478b4055c0c1d","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"7aa8944030de87d4","type":"api-call-service","z":"78e478b4055c0c1d","name":"Wohnzimmer Rollo Position","server":"86616542.19f378","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rollo_wohnzimmer","data":"{\"position\":\"{{payload}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1840,"y":260,"wires":[[]]},{"id":"048f1c350c15c1d0","type":"trigger-state","z":"78e478b4055c0c1d","name":"Zeitgeber Schließen Wohnzimmer Rollo","server":"86616542.19f378","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"input_datetime.zeitgeber_schliessen_wohnzimmer_rollo","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":220,"y":240,"wires":[["8f81e312043092d7"],[]]},{"id":"c554c8729568f1b1","type":"trigger-state","z":"78e478b4055c0c1d","name":"Zeitgeber Öffnen Wohnzimmer Rollo","server":"86616542.19f378","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"input_datetime.zeitgeber_offnen_wohnzimmer_rollo","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":210,"y":320,"wires":[["ec3268429b4e7826"],[]]},{"id":"8f81e312043092d7","type":"ha-wait-until","z":"78e478b4055c0c1d","name":"","server":"86616542.19f378","version":0,"outputs":1,"entityId":"input_boolean.automatisierung_wohnzimmer_rollo_schliessen","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":0,"timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":500,"y":240,"wires":[["e95e9509a31b98bc"]]},{"id":"ec3268429b4e7826","type":"ha-wait-until","z":"78e478b4055c0c1d","name":"","server":"86616542.19f378","version":0,"outputs":1,"entityId":"input_boolean.automatisierung_wohnzimmer_rollo_offnen","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":0,"timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":500,"y":320,"wires":[["16f5bdba8aa3a479"]]},{"id":"e95e9509a31b98bc","type":"moment","z":"78e478b4055c0c1d","name":"","topic":"","input":"","inputType":"msg","inTz":"Europe/Berlin","adjAmount":0,"adjType":"days","adjDir":"add","format":"LT","locale":"de_DE","output":"","outputType":"msg","outTz":"Europe/Berlin","x":740,"y":260,"wires":[["109bfc395978f891"]]},{"id":"16f5bdba8aa3a479","type":"moment","z":"78e478b4055c0c1d","name":"","topic":"","input":"","inputType":"msg","inTz":"Europe/Berlin","adjAmount":0,"adjType":"days","adjDir":"add","format":"LT","locale":"de_DE","output":"","outputType":"msg","outTz":"Europe/Berlin","x":740,"y":300,"wires":[["e60c24e1047a0541"]]},{"id":"109bfc395978f891","type":"ha-entity","z":"78e478b4055c0c1d","name":"Uhrzeit Schließen Wohnzimmer Rollo","server":"86616542.19f378","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Uhrzeit Schließen Wohnzimmer Rollo"},{"property":"device_class","value":"sensor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1030,"y":140,"wires":[["61dd90638f7eb8b0"]]},{"id":"e60c24e1047a0541","type":"ha-entity","z":"78e478b4055c0c1d","name":"Uhrzeit Öffnen Wohnzimmer Rollo","server":"86616542.19f378","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Uhrzeit Öffnen Wohnzimmer Rollo"},{"property":"device_class","value":"sensor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1020,"y":400,"wires":[["d68138f30b29cbfd"]]},{"id":"d4e85b864059b77c","type":"server-state-changed","z":"78e478b4055c0c1d","name":"Schalter an/aus","server":"86616542.19f378","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.automatisierung_wohnzimmer_rollo_schliessen","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"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":960,"y":60,"wires":[["08f837b5f8b44642"],["e6f129953a8791f7"]]},{"id":"08f837b5f8b44642","type":"template","z":"78e478b4055c0c1d","name":"Activate Automation ","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"suspended false","output":"str","x":1200,"y":40,"wires":[["981d0d74693eaacb"]]},{"id":"e6f129953a8791f7","type":"template","z":"78e478b4055c0c1d","name":"Suspend Automation ","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"suspended true","output":"str","x":1200,"y":80,"wires":[["981d0d74693eaacb"]]},{"id":"61dd90638f7eb8b0","type":"template","z":"78e478b4055c0c1d","name":"Offtime","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"offtime {{{payload}}}","output":"str","x":1280,"y":160,"wires":[["981d0d74693eaacb","ad6dfd7e46750596"]]},{"id":"d68138f30b29cbfd","type":"template","z":"78e478b4055c0c1d","name":"Ontime","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"ontime {{{payload}}}","output":"str","x":1280,"y":380,"wires":[["f811026bb1b3cc36","3d68b7fe83970bd2"]]},{"id":"976c79ee95af33c4","type":"server-state-changed","z":"78e478b4055c0c1d","name":"Schalter an/aus","server":"86616542.19f378","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.automatisierung_wohnzimmer_rollo_offnen","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"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":960,"y":480,"wires":[["719bf36cfe35786c"],["d321d769c8b68f99"]]},{"id":"719bf36cfe35786c","type":"template","z":"78e478b4055c0c1d","name":"Activate Automation ","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"suspended false","output":"str","x":1200,"y":460,"wires":[["f811026bb1b3cc36"]]},{"id":"d321d769c8b68f99","type":"template","z":"78e478b4055c0c1d","name":"Suspend Automation ","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"suspended true","output":"str","x":1200,"y":500,"wires":[["f811026bb1b3cc36"]]},{"id":"3d68b7fe83970bd2","type":"debug","z":"78e478b4055c0c1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":460,"wires":[]},{"id":"f811026bb1b3cc36","type":"schedex","z":"78e478b4055c0c1d","name":"Schedex","passthroughunhandled":false,"suspended":false,"lat":"","lon":"","ontime":"","ontopic":"","onpayload":"","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":1480,"y":400,"wires":[["7aa8944030de87d4","24c46dd306452d9c"]]},{"id":"981d0d74693eaacb","type":"schedex","z":"78e478b4055c0c1d","name":"Schedex","passthroughunhandled":true,"suspended":false,"lat":"","lon":"","ontime":"","ontopic":"","onpayload":"","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":1480,"y":120,"wires":[["37b86c74c3f3ccb4","7aa8944030de87d4"]]},{"id":"37b86c74c3f3ccb4","type":"debug","z":"78e478b4055c0c1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1670,"y":40,"wires":[]},{"id":"ad6dfd7e46750596","type":"debug","z":"78e478b4055c0c1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1430,"y":60,"wires":[]},{"id":"24c46dd306452d9c","type":"debug","z":"78e478b4055c0c1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1690,"y":480,"wires":[]},{"id":"2ac3a7c295203020","type":"server-state-changed","z":"78e478b4055c0c1d","name":"Cover Level","server":"86616542.19f378","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.offnung_wohnzimmer_rollo","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","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"}],"x":1320,"y":260,"wires":[["7aa8944030de87d4"]]},{"id":"86616542.19f378","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]