Skip to content

Instantly share code, notes, and snippets.

@thewindev

thewindev/subflow.json

Last active Oct 21, 2020
Embed
What would you like to do?
Node-Red subflow for sending notifications
[{"id":"3c8ad50a.81cbba","type":"subflow","name":"Subflow 1","info":"","category":"","in":[{"x":-20,"y":80,"wires":[{"id":"6d65619b.8360a"}]}],"out":[],"env":[{"name":"message","type":"str","value":"Hello","ui":{"label":{"en-US":"Message"}}},{"name":"title","type":"str","value":"","ui":{"label":{"en-US":"Notification title"}}}],"color":"#DDAA99"},{"id":"8f27018e.a9918","type":"api-call-service","z":"3c8ad50a.81cbba","name":"Send notification","server":"8501408e.93b69","version":1,"debugenabled":true,"service_domain":"notify","service":"mobile_app_galaxy_s9","entityId":"","data":"{\"message\": $env('message'), \"title\": $env('title')}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":810,"y":60,"wires":[[]]},{"id":"6d65619b.8360a","type":"time-range-switch","z":"3c8ad50a.81cbba","name":"Is it between 10 PM and 8 AM?","lat":"","lon":"","startTime":"22:00","endTime":"08:00","startOffset":0,"endOffset":0,"x":210,"y":80,"wires":[[],["d710e0e9.281d9"]]},{"id":"d710e0e9.281d9","type":"api-current-state","z":"3c8ad50a.81cbba","name":"Notifications are allowed","server":"8501408e.93b69","version":1,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.","state_type":"habool","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":60,"wires":[["8f27018e.a9918"],[]]},{"id":"dea216ae.5edb18","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"e8d6b457.8bece8","type":"server-state-changed","z":"dea216ae.5edb18","name":"Office door opened","server":"8501408e.93b69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.office_door","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,"x":110,"y":280,"wires":[["32e64d57.c4b372"],["6ef491fc.32e0e"]]},{"id":"32e64d57.c4b372","type":"subflow:3c8ad50a.81cbba","z":"dea216ae.5edb18","name":"Door opened notification","env":[{"name":"message","value":"The office door is opened","type":"str"},{"name":"title","value":"Opened","type":"str"}],"x":450,"y":260,"wires":[]},{"id":"6ef491fc.32e0e","type":"subflow:3c8ad50a.81cbba","z":"dea216ae.5edb18","name":"Door closed notification","env":[{"name":"message","value":"The office door is closed","type":"str"},{"name":"title","value":"Closed","type":"str"}],"x":450,"y":320,"wires":[]},{"id":"8501408e.93b69","type":"server","z":"","name":"Home Assistant"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment