Created
January 21, 2021 00:08
-
-
Save MaxVRAM/c6d0892ea3a8d156fcc11bc92fbd7f53 to your computer and use it in GitHub Desktop.
Home Assistant Node Red flow to notify when clothes washing is done with today and tomorrow's chance of rain pulled from BOM (default is Melbourne Australia, change locale in function node after FTP pull request)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id":"777f5f6a.b72fc8", | |
"type":"poll-state", | |
"z":"921d2869.baa6e", | |
"name":"Washing Watts over 30", | |
"server":"dc09bc1e.a5f7f", | |
"version":1, | |
"exposeToHomeAssistant":false, | |
"haConfig":[ | |
{ | |
"property":"name", | |
"value":"" | |
}, | |
{ | |
"property":"icon", | |
"value":"" | |
} | |
], | |
"updateinterval":"1", | |
"updateIntervalUnits":"seconds", | |
"outputinitially":false, | |
"outputonchanged":true, | |
"entity_id":"sensor.washing_watts", | |
"state_type":"num", | |
"halt_if":"3", | |
"halt_if_type":"num", | |
"halt_if_compare":"gt", | |
"outputs":2, | |
"x":130, | |
"y":440, | |
"wires":[ | |
[ | |
"d79fcfd.df4893" | |
], | |
[ | |
"3f70d441.7a6c7c" | |
] | |
] | |
}, | |
{ | |
"id":"d79fcfd.df4893", | |
"type":"change", | |
"z":"921d2869.baa6e", | |
"name":"True", | |
"rules":[ | |
{ | |
"t":"set", | |
"p":"payload", | |
"pt":"msg", | |
"to":"true", | |
"tot":"bool" | |
} | |
], | |
"action":"", | |
"property":"", | |
"from":"", | |
"to":"", | |
"reg":false, | |
"x":310, | |
"y":420, | |
"wires":[ | |
[ | |
"af432ff2.11e8c8" | |
] | |
] | |
}, | |
{ | |
"id":"3f70d441.7a6c7c", | |
"type":"change", | |
"z":"921d2869.baa6e", | |
"name":"False", | |
"rules":[ | |
{ | |
"t":"set", | |
"p":"payload", | |
"pt":"msg", | |
"to":"false", | |
"tot":"bool" | |
} | |
], | |
"action":"", | |
"property":"", | |
"from":"", | |
"to":"", | |
"reg":false, | |
"x":310, | |
"y":460, | |
"wires":[ | |
[ | |
"af432ff2.11e8c8" | |
] | |
] | |
}, | |
{ | |
"id":"af432ff2.11e8c8", | |
"type":"rbe", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"func":"rbe", | |
"gap":"", | |
"start":"", | |
"inout":"out", | |
"property":"payload", | |
"x":450, | |
"y":440, | |
"wires":[ | |
[ | |
"cdaa4e4c.73ac4", | |
"75f5a2c.f73535c" | |
] | |
] | |
}, | |
{ | |
"id":"cdaa4e4c.73ac4", | |
"type":"switch", | |
"z":"921d2869.baa6e", | |
"name":"Is false", | |
"property":"payload", | |
"propertyType":"msg", | |
"rules":[ | |
{ | |
"t":"false" | |
} | |
], | |
"checkall":"true", | |
"repair":false, | |
"outputs":1, | |
"x":600, | |
"y":420, | |
"wires":[ | |
[ | |
"3d9d7b71.e22b74" | |
] | |
] | |
}, | |
{ | |
"id":"75f5a2c.f73535c", | |
"type":"switch", | |
"z":"921d2869.baa6e", | |
"name":"Is true", | |
"property":"payload", | |
"propertyType":"msg", | |
"rules":[ | |
{ | |
"t":"true" | |
} | |
], | |
"checkall":"true", | |
"repair":false, | |
"outputs":1, | |
"x":590, | |
"y":480, | |
"wires":[ | |
[ | |
"51ef3f1c.747b" | |
] | |
] | |
}, | |
{ | |
"id":"51ef3f1c.747b", | |
"type":"change", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"rules":[ | |
{ | |
"t":"set", | |
"p":"reset", | |
"pt":"msg", | |
"to":"1", | |
"tot":"str" | |
} | |
], | |
"action":"", | |
"property":"", | |
"from":"", | |
"to":"", | |
"reg":false, | |
"x":760, | |
"y":480, | |
"wires":[ | |
[ | |
"3d9d7b71.e22b74" | |
] | |
] | |
}, | |
{ | |
"id":"3d9d7b71.e22b74", | |
"type":"delay", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"pauseType":"delay", | |
"timeout":"60", | |
"timeoutUnits":"seconds", | |
"rate":"1", | |
"nbRateUnits":"1", | |
"rateUnits":"second", | |
"randomFirst":"1", | |
"randomLast":"5", | |
"randomUnits":"seconds", | |
"drop":false, | |
"x":960, | |
"y":420, | |
"wires":[ | |
[ | |
"fb5f6c32.43318" | |
] | |
] | |
}, | |
{ | |
"id":"fb5f6c32.43318", | |
"type":"ftp in", | |
"z":"921d2869.baa6e", | |
"ftp":"f119c92b.492af8", | |
"operation":"get", | |
"filename":"/anon/gen/fwo/IDV10753.xml", | |
"localFilename":"melb_weather_tomorrow.xml", | |
"name":"", | |
"x":590, | |
"y":640, | |
"wires":[ | |
[ | |
"c5405ca4.c5fa28" | |
] | |
] | |
}, | |
{ | |
"id":"b61b41a2.6f3ed8", | |
"type":"inject", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"props":[ | |
{ | |
"p":"payload" | |
}, | |
{ | |
"p":"topic", | |
"vt":"str" | |
} | |
], | |
"repeat":"", | |
"crontab":"", | |
"once":false, | |
"onceDelay":0.1, | |
"topic":"", | |
"payload":"", | |
"payloadType":"date", | |
"x":420, | |
"y":640, | |
"wires":[ | |
[ | |
"fb5f6c32.43318" | |
] | |
] | |
}, | |
{ | |
"id":"16a2bb7f.d7fe8d", | |
"type":"xml", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"property":"payload", | |
"attr":"", | |
"chr":"", | |
"x":1050, | |
"y":640, | |
"wires":[ | |
[ | |
"62f945b6.0f8724" | |
] | |
] | |
}, | |
{ | |
"id":"77ef04f0.ca755c", | |
"type":"file in", | |
"z":"921d2869.baa6e", | |
"name":"Get Local Weather", | |
"filename":"melb_weather_tomorrow.xml", | |
"format":"utf8", | |
"chunk":false, | |
"sendError":false, | |
"encoding":"none", | |
"x":890, | |
"y":640, | |
"wires":[ | |
[ | |
"16a2bb7f.d7fe8d" | |
] | |
] | |
}, | |
{ | |
"id":"c5405ca4.c5fa28", | |
"type":"delay", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"pauseType":"delay", | |
"timeout":"1", | |
"timeoutUnits":"seconds", | |
"rate":"1", | |
"nbRateUnits":"1", | |
"rateUnits":"second", | |
"randomFirst":"1", | |
"randomLast":"5", | |
"randomUnits":"seconds", | |
"drop":false, | |
"x":720, | |
"y":640, | |
"wires":[ | |
[ | |
"77ef04f0.ca755c" | |
] | |
] | |
}, | |
{ | |
"id":"f3490c8c.3ae448", | |
"type":"api-call-service", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"server":"dc09bc1e.a5f7f", | |
"version":1, | |
"debugenabled":false, | |
"service_domain":"notify", | |
"service":"notify", | |
"entityId":"", | |
"data":"{\"message\":\"{{payload}}\"}", | |
"dataType":"json", | |
"mergecontext":"", | |
"output_location":"", | |
"output_location_type":"none", | |
"mustacheAltTags":false, | |
"x":1390, | |
"y":640, | |
"wires":[ | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"62f945b6.0f8724", | |
"type":"function", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"func":"var today = msg.payload.product.forecast[0].area[52][\"forecast-period\"][0].text[1]._;\nvar tomorrow = msg.payload.product.forecast[0].area[52][\"forecast-period\"][1].text[1]._;\n\nvar result = \"WASHING DONE! \";\n\nif (today == tomorrow)\n result = result + \"Today and tomorrow have a \" + today + \" chance of rain.\";\nelse\n result = result + \"Today has \" + today + \" chance of rain and tomorrow has \" + tomorrow;\n \nvar outputMsg = {payload: result};\n\nreturn {payload: result};", | |
"outputs":1, | |
"noerr":0, | |
"initialize":"", | |
"finalize":"", | |
"x":1200, | |
"y":640, | |
"wires":[ | |
[ | |
"f3490c8c.3ae448" | |
] | |
] | |
}, | |
{ | |
"id":"9be71c0e.1f1bd8", | |
"type":"inject", | |
"z":"921d2869.baa6e", | |
"name":"", | |
"props":[ | |
{ | |
"p":"payload" | |
}, | |
{ | |
"p":"topic", | |
"vt":"str" | |
} | |
], | |
"repeat":"", | |
"crontab":"", | |
"once":true, | |
"onceDelay":"10", | |
"topic":"", | |
"payload":"reset", | |
"payloadType":"msg", | |
"x":590, | |
"y":540, | |
"wires":[ | |
[ | |
"51ef3f1c.747b" | |
] | |
] | |
}, | |
{ | |
"id":"dc09bc1e.a5f7f", | |
"type":"server", | |
"z":"", | |
"name":"Home Assistant", | |
"addon":true | |
}, | |
{ | |
"id":"f119c92b.492af8", | |
"type":"ftp", | |
"z":null, | |
"host":"ftp.bom.gov.au", | |
"port":"", | |
"secureOptions":"", | |
"user":"", | |
"connTimeout":"", | |
"pasvTimeout":"", | |
"keepalive":"" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment