Skip to content

Instantly share code, notes, and snippets.

@AZDane
Created April 14, 2019 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AZDane/7db2a51e76e08be4e8ca3928654d8a33 to your computer and use it in GitHub Desktop.
Save AZDane/7db2a51e76e08be4e8ca3928654d8a33 to your computer and use it in GitHub Desktop.
Sunshade Wind
[{"id":"b2cc427c.c0414","type":"inject","z":"8cda756f.96dc48","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":60,"wires":[["722ae295.8141cc"]]},{"id":"722ae295.8141cc","type":"api-current-state","z":"8cda756f.96dc48","name":"Wind Speed","server":"a6d7ccd5.9cc23","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.dark_sky_wind_speed","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":150,"y":100,"wires":[["f33d0de8.dca0b"]]},{"id":"f33d0de8.dca0b","type":"switch","z":"8cda756f.96dc48","name":"Conditions","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"6","vt":"num"},{"t":"lt","v":"6","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":210,"y":140,"wires":[["3c907a0a.bcd426","62b55154.4bc94"],["24fb291c.7a21e6"]],"outputLabels":["on","off"]},{"id":"3c907a0a.bcd426","type":"api-call-service","z":"8cda756f.96dc48","name":"Too Windy","server":"a6d7ccd5.9cc23","service_domain":"input_boolean","service":"turn_on","data":"{\"entity_id\":\"input_boolean.shade_too_windy\"}","mergecontext":"","output_location":"","output_location_type":"none","x":510,"y":100,"wires":[[]]},{"id":"24fb291c.7a21e6","type":"trigger","z":"8cda756f.96dc48","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"5","extend":false,"units":"min","reset":"on","bytopic":"all","name":"","x":350,"y":200,"wires":[["b68869d9.d12f48"]]},{"id":"b68869d9.d12f48","type":"api-call-service","z":"8cda756f.96dc48","name":"Not Windy","server":"a6d7ccd5.9cc23","service_domain":"input_boolean","service":"turn_off","data":"{\"entity_id\":\"input_boolean.shade_too_windy\"}","mergecontext":"","output_location":"","output_location_type":"none","x":510,"y":140,"wires":[[]]},{"id":"b7fa6f5e.06f5b","type":"inject","z":"8cda756f.96dc48","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":260,"wires":[["4dd7a455.729d6c"]]},{"id":"4dd7a455.729d6c","type":"api-current-state","z":"8cda756f.96dc48","name":"Wind Speed","server":"a6d7ccd5.9cc23","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.dark_sky_wind_gust","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":130,"y":300,"wires":[["6d52832f.9117bc"]]},{"id":"6d52832f.9117bc","type":"switch","z":"8cda756f.96dc48","name":"Conditions","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"10","vt":"num"},{"t":"lt","v":"10","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":110,"y":380,"wires":[["2a8f2014.e99f4","3ca78109.05b0ae"],["f201f16b.c6e17"]]},{"id":"2a8f2014.e99f4","type":"api-call-service","z":"8cda756f.96dc48","name":"Too Gusty","server":"a6d7ccd5.9cc23","service_domain":"input_boolean","service":"turn_on","data":"{\"entity_id\":\"input_boolean.shade_too_windy_gust\"}","mergecontext":"","output_location":"","output_location_type":"none","x":320,"y":380,"wires":[[]]},{"id":"f201f16b.c6e17","type":"trigger","z":"8cda756f.96dc48","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"5","extend":false,"units":"min","reset":"on","bytopic":"all","name":"","x":270,"y":440,"wires":[["832064b7.da92f8"]]},{"id":"832064b7.da92f8","type":"api-call-service","z":"8cda756f.96dc48","name":"Not Gusty","server":"a6d7ccd5.9cc23","service_domain":"input_boolean","service":"turn_off","data":"{\"entity_id\":\"input_boolean.shade_too_windy_gust\"}","mergecontext":"","output_location":"","output_location_type":"none","x":440,"y":440,"wires":[[]]},{"id":"3ca78109.05b0ae","type":"change","z":"8cda756f.96dc48","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":110,"y":440,"wires":[["f201f16b.c6e17"]]},{"id":"62b55154.4bc94","type":"change","z":"8cda756f.96dc48","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":200,"wires":[["24fb291c.7a21e6"]]},{"id":"f36c7638.1cf818","type":"server-state-changed","z":"8cda756f.96dc48","name":"Too Windy","server":"a6d7ccd5.9cc23","entityidfilter":"input_boolean.shade_too_windy","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":60,"y":520,"wires":[["dc3716e2.8f2bd8"],[]]},{"id":"78edc67e.60bc18","type":"api-current-state","z":"8cda756f.96dc48","name":"Halt if Kitchen Shade Up","server":"a6d7ccd5.9cc23","outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"cover.kitchen_shade","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":630,"y":560,"wires":[["a4faa7ca.c7e438"],[]]},{"id":"b4b7886.1624078","type":"api-current-state","z":"8cda756f.96dc48","name":"Halt if Patio Shade Up","server":"a6d7ccd5.9cc23","outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"cover.patio_shade","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":620,"y":600,"wires":[["a4faa7ca.c7e438"],[]]},{"id":"f0a40d8.ce395f","type":"api-current-state","z":"8cda756f.96dc48","name":"Halt if Side Shade Up","server":"a6d7ccd5.9cc23","outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"cover.side_shade","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":620,"y":640,"wires":[["a4faa7ca.c7e438"],[]]},{"id":"61e4c458.143e9c","type":"api-call-service","z":"8cda756f.96dc48","name":"Make Alexa Speak","server":"a6d7ccd5.9cc23","service_domain":"media_player","service":"alexa_tts","data":"{\"entity_id\":\"media_player.living_room_dot, media_player.john_s_echo, media_player.bedroom_spot\",\"message\":\"{{payload}}\"}","mergecontext":"","output_location":"payload","output_location_type":"msg","x":990,"y":700,"wires":[[]]},{"id":"f1de8487.8ba678","type":"change","z":"8cda756f.96dc48","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Attention. The wind is picking up and some of the shades are still down. Consider raising them.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":660,"wires":[["61e4c458.143e9c"]]},{"id":"a4faa7ca.c7e438","type":"trigger","z":"8cda756f.96dc48","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":960,"y":580,"wires":[["d2ff276e.07d0d8"]]},{"id":"d2ff276e.07d0d8","type":"switch","z":"8cda756f.96dc48","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":950,"y":620,"wires":[[],["f1de8487.8ba678"]]},{"id":"402e617f.834ea","type":"api-current-state","z":"8cda756f.96dc48","name":"Too Windy","server":"a6d7ccd5.9cc23","outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.shade_too_windy","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":590,"y":780,"wires":[["129ba03e.096f3"],[]]},{"id":"fda7fb48.5df458","type":"api-current-state","z":"8cda756f.96dc48","name":"Too Windy Gust","server":"a6d7ccd5.9cc23","outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.shade_too_windy_gust","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":600,"y":820,"wires":[["129ba03e.096f3"],[]]},{"id":"9a567850.252288","type":"api-call-service","z":"8cda756f.96dc48","name":"Make Alexa Speak","server":"a6d7ccd5.9cc23","service_domain":"media_player","service":"alexa_tts","data":"{\"entity_id\":\"media_player.living_room_dot, media_player.john_s_echo, media_player.bedroom_spot\",\"message\":\"{{payload}}\"}","mergecontext":"","output_location":"payload","output_location_type":"msg","x":1010,"y":940,"wires":[[]]},{"id":"ed4d7b15.8c4a18","type":"change","z":"8cda756f.96dc48","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Attention. Shades have been commanded down, but it is too windy","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":880,"wires":[["9a567850.252288"]]},{"id":"14a80597.e4956a","type":"trigger-state","z":"8cda756f.96dc48","name":"Kitchen Shade","server":"a6d7ccd5.9cc23","entityid":"input_number.kitchen_shade","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"xnxiqjzh7jk","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"<","comparatorValueDatatype":"str","comparatorValue":"100"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":100,"y":760,"wires":[["316b977f.f29d78"],[]]},{"id":"ba194d7b.3cf1a","type":"trigger-state","z":"8cda756f.96dc48","name":"Side Shade","server":"a6d7ccd5.9cc23","entityid":"input_number.side_shade","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"6i204a4ah7h","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"<","comparatorValueDatatype":"str","comparatorValue":"100"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":90,"y":800,"wires":[["316b977f.f29d78"],[]]},{"id":"806ae34c.92a99","type":"trigger-state","z":"8cda756f.96dc48","name":"Patio Shade","server":"a6d7ccd5.9cc23","entityid":"input_number.patio_shade","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"g7lxbmkv6ia","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"<","comparatorValueDatatype":"str","comparatorValue":"100"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":90,"y":840,"wires":[["316b977f.f29d78"],[]]},{"id":"316b977f.f29d78","type":"trigger","z":"8cda756f.96dc48","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":286,"y":794,"wires":[["ad0c81a1.e91d8"]]},{"id":"ad0c81a1.e91d8","type":"switch","z":"8cda756f.96dc48","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":800,"wires":[[],["402e617f.834ea","fda7fb48.5df458"]]},{"id":"129ba03e.096f3","type":"trigger","z":"8cda756f.96dc48","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":800,"y":800,"wires":[["b5aecffa.e1512"]]},{"id":"b5aecffa.e1512","type":"switch","z":"8cda756f.96dc48","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":944,"y":806,"wires":[[],["ed4d7b15.8c4a18"]]},{"id":"4510abb3.1b9dc4","type":"server-state-changed","z":"8cda756f.96dc48","name":"Too Gusty","server":"a6d7ccd5.9cc23","entityidfilter":"input_boolean.shade_too_windy_gust","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":60,"y":560,"wires":[["dc3716e2.8f2bd8"],[]]},{"id":"dc3716e2.8f2bd8","type":"trigger","z":"8cda756f.96dc48","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":220,"y":540,"wires":[["62158d90.e19be4"]]},{"id":"62158d90.e19be4","type":"switch","z":"8cda756f.96dc48","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":378,"y":576,"wires":[[],["78edc67e.60bc18","b4b7886.1624078","f0a40d8.ce395f"]]},{"id":"a6d7ccd5.9cc23","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment