Advertisement
johannwilken

Irrigation: Automation Flow

Aug 8th, 2022 (edited)
810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 13.86 KB | None | 0 0
  1. [{"id":"cb43636996b69b61","type":"server-state-changed","z":"97a0da3560c6776a","name":"If Irrigation Cycle Manual","server":"b560df0.404d82","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.irrigation_cycle_manual","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":110,"y":720,"wires":[["d56c23c4d117c0dd"]]},{"id":"d56c23c4d117c0dd","type":"switch","z":"97a0da3560c6776a","name":"On\\Off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":350,"y":720,"wires":[["bb0c036b2aee0e6e","126a20fc932678f6"],[]]},{"id":"59664c91e30835a7","type":"inject","z":"97a0da3560c6776a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":860,"wires":[["0ad52b7f1869ba1a"]]},{"id":"0ad52b7f1869ba1a","type":"function","z":"97a0da3560c6776a","name":"","func":"const states = global.get('homeassistant').homeAssistant.states;\nconst now = new Date();\nconst alarm = states['input_datetime.irrigation_cycle_time'].attributes;\n\nif(now.getHours() === alarm.hour && now.getMinutes() === alarm.minute) {\n    return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":860,"wires":[["b60e386415b8ff95"]]},{"id":"b60e386415b8ff95","type":"api-current-state","z":"97a0da3560c6776a","name":"If Irrigation Day Active","server":"b560df0.404d82","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.irrigation_day_active","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","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":540,"y":860,"wires":[["12b24cb9fb66babf"],[]]},{"id":"12b24cb9fb66babf","type":"api-current-state","z":"97a0da3560c6776a","name":"If Irrigation Automation On\\Off Is On","server":"b560df0.404d82","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_automation_on_off","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","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":580,"y":940,"wires":[["c6620aa1f83f4abc"],[]]},{"id":"bb0c036b2aee0e6e","type":"api-call-service","z":"97a0da3560c6776a","name":"Notify JW","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_jw_s21","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"Cycle Started\",\"title\":\"Irrigation\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1140,"y":780,"wires":[[]]},{"id":"126a20fc932678f6","type":"api-call-service","z":"97a0da3560c6776a","name":"Turn Irrigation Back On","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_back"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1190,"y":860,"wires":[["24274471afd1a3d8"]]},{"id":"24274471afd1a3d8","type":"ha-wait-until","z":"97a0da3560c6776a","name":"Wait until Irrigation Back is off","server":"b560df0.404d82","version":1,"outputs":1,"entityId":"switch.irrigation_back","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":1510,"y":860,"wires":[["b182ebe32ac4e55e"]]},{"id":"42add76db521eaf4","type":"delay","z":"97a0da3560c6776a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":940,"y":1000,"wires":[["50140ac9b9c5e8d9"]]},{"id":"50140ac9b9c5e8d9","type":"api-call-service","z":"97a0da3560c6776a","name":"Turn Irrigation Braai On","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_braai"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1190,"y":1000,"wires":[["196b08b7a463c903"]]},{"id":"196b08b7a463c903","type":"ha-wait-until","z":"97a0da3560c6776a","name":"Wait until Irrigation Braai off","server":"b560df0.404d82","version":1,"outputs":1,"entityId":"switch.irrigation_braai","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":1500,"y":1000,"wires":[["2eb92d2173940c3a"]]},{"id":"9b8dd2668cf5962b","type":"delay","z":"97a0da3560c6776a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":940,"y":1140,"wires":[["bd5dd0eb2bd9b212"]]},{"id":"bd5dd0eb2bd9b212","type":"api-call-service","z":"97a0da3560c6776a","name":"Turn Irrigation Wall On","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_wall"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1180,"y":1140,"wires":[["3edac2f8a12b2a20"]]},{"id":"3edac2f8a12b2a20","type":"ha-wait-until","z":"97a0da3560c6776a","name":"Wait until Irrigation Wall off","server":"b560df0.404d82","version":1,"outputs":1,"entityId":"switch.irrigation_wall","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":1500,"y":1140,"wires":[["7f9b56fb49ccbc79"]]},{"id":"fbd0740cb4ed4f83","type":"delay","z":"97a0da3560c6776a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":940,"y":1280,"wires":[["69ee2d097336613d"]]},{"id":"69ee2d097336613d","type":"api-call-service","z":"97a0da3560c6776a","name":"Turn Irrigation Front On","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_front"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1190,"y":1280,"wires":[["bad92ec8b11f1a23"]]},{"id":"bad92ec8b11f1a23","type":"ha-wait-until","z":"97a0da3560c6776a","name":"Wait until Irrigation Front is off","server":"b560df0.404d82","version":1,"outputs":1,"entityId":"switch.irrigation_front","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":1510,"y":1280,"wires":[["4aefb3cc333d8326"]]},{"id":"4aefb3cc333d8326","type":"delay","z":"97a0da3560c6776a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":940,"y":1360,"wires":[["e379ae116d5d2ca9","f9e44ff850601967"]]},{"id":"e379ae116d5d2ca9","type":"api-call-service","z":"97a0da3560c6776a","name":"Notify JW","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_jw_s21","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"Cycle Ended\",\"title\":\"Irrigation\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1140,"y":1360,"wires":[[]]},{"id":"f9e44ff850601967","type":"api-call-service","z":"97a0da3560c6776a","name":"Turn Irrigation Cycle Manual Off ","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_cycle_manual"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1420,"wires":[[]]},{"id":"e11bda15e08a0827","type":"api-call-service","z":"97a0da3560c6776a","name":"Notify JW","server":"b560df0.404d82","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_jw_s21","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"Cycle Stopped\",\"title\":\"Irrigation\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1140,"y":1480,"wires":[[]]},{"id":"b182ebe32ac4e55e","type":"api-current-state","z":"97a0da3560c6776a","name":"If Irrigation Automation Is On","server":"b560df0.404d82","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_automation_on_off","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","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1200,"y":940,"wires":[["42add76db521eaf4"],["e11bda15e08a0827"]]},{"id":"2eb92d2173940c3a","type":"api-current-state","z":"97a0da3560c6776a","name":"If Irrigation Automation Is On","server":"b560df0.404d82","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_automation_on_off","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","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1200,"y":1080,"wires":[["9b8dd2668cf5962b"],["e11bda15e08a0827"]]},{"id":"7f9b56fb49ccbc79","type":"api-current-state","z":"97a0da3560c6776a","name":"If Irrigation Automation Is On","server":"b560df0.404d82","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_automation_on_off","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","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1200,"y":1220,"wires":[["fbd0740cb4ed4f83"],["e11bda15e08a0827"]]},{"id":"7020232036a4d0dd","type":"comment","z":"97a0da3560c6776a","name":"Irrigation Automation","info":"","x":90,"y":800,"wires":[]},{"id":"c6620aa1f83f4abc","type":"api-current-state","z":"97a0da3560c6776a","name":"If Weekly Rain is <= 6mm","server":"b560df0.404d82","version":3,"outputs":2,"halt_if":"6","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.rainfall_weekly_mm","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","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":550,"y":1020,"wires":[["bb0c036b2aee0e6e","126a20fc932678f6"],[]]},{"id":"7c4c6c8555ce2d92","type":"inject","z":"97a0da3560c6776a","name":"Munual Start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":920,"wires":[["b60e386415b8ff95"]]},{"id":"b560df0.404d82","type":"server","name":"Home Assistant","version":4,"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"}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement