Instantly share code, notes, and snippets.
Created
October 16, 2020 19:03
-
Star
(0)
0
You must be signed in to star a gist -
Fork
(0)
0
You must be signed in to fork a gist
-
Save sacdroid/832e5d86a3dac72f634e59eddc1fa46a to your computer and use it in GitHub Desktop.
Echo Button Nodered flow
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":"cceabdf6.2a569", | |
"type":"tab", | |
"label":"echo button", | |
"disabled":false, | |
"info":"" | |
}, | |
{ | |
"id":"693a399.f7535c8", | |
"type":"server-state-changed", | |
"z":"cceabdf6.2a569", | |
"name":"CounterStarts", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"exposeToHomeAssistant":false, | |
"haConfig":[ | |
{ | |
"property":"name", | |
"value":"" | |
}, | |
{ | |
"property":"icon", | |
"value":"" | |
} | |
], | |
"entityidfilter":"counter.echo_button_counter", | |
"entityidfiltertype":"exact", | |
"outputinitially":false, | |
"state_type":"num", | |
"haltifstate":"1", | |
"halt_if_type":"num", | |
"halt_if_compare":"is", | |
"outputs":2, | |
"output_only_on_state_change":true, | |
"x":146, | |
"y":228, | |
"wires":[ | |
[ | |
"29ef3552.4c6cea" | |
], | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"29ef3552.4c6cea", | |
"type":"ha-wait-until", | |
"z":"cceabdf6.2a569", | |
"name":"WaitFor1Second", | |
"server":"96a3b63.8076b48", | |
"outputs":2, | |
"entityId":"counter.echo_button_counter", | |
"entityIdFilterType":"exact", | |
"property":"state", | |
"comparator":"is", | |
"value":"4", | |
"valueType":"num", | |
"timeout":"900", | |
"timeoutType":"num", | |
"timeoutUnits":"milliseconds", | |
"entityLocation":"", | |
"entityLocationType":"none", | |
"checkCurrentState":true, | |
"blockInputOverrides":true, | |
"x":446, | |
"y":222, | |
"wires":[ | |
[ | |
], | |
[ | |
"2de6c6c1.3defda", | |
"f4ab2dff.194f3", | |
"4debd629.a9b888", | |
"c6f5eeb0.60df4" | |
] | |
] | |
}, | |
{ | |
"id":"2de6c6c1.3defda", | |
"type":"api-current-state", | |
"z":"cceabdf6.2a569", | |
"name":"1 Counter", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"outputs":2, | |
"halt_if":"1", | |
"halt_if_type":"num", | |
"halt_if_compare":"is", | |
"override_topic":false, | |
"entity_id":"counter.echo_button_counter", | |
"state_type":"num", | |
"state_location":"payload", | |
"override_payload":"msg", | |
"entity_location":"data", | |
"override_data":"msg", | |
"blockInputOverrides":false, | |
"x":701.5, | |
"y":130, | |
"wires":[ | |
[ | |
"b01726f5.030098" | |
], | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"b01726f5.030098", | |
"type":"api-call-service", | |
"z":"cceabdf6.2a569", | |
"name":"TurnOffOfficeLights", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"debugenabled":false, | |
"service_domain":"light", | |
"service":"toggle", | |
"entityId":"light.office_room_lights", | |
"data":"", | |
"dataType":"json", | |
"mergecontext":"", | |
"output_location":"", | |
"output_location_type":"none", | |
"mustacheAltTags":false, | |
"x":940, | |
"y":75, | |
"wires":[ | |
[ | |
"fb16ddcc.35bae" | |
] | |
] | |
}, | |
{ | |
"id":"f4ab2dff.194f3", | |
"type":"api-current-state", | |
"z":"cceabdf6.2a569", | |
"name":"2 counter", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"outputs":2, | |
"halt_if":"2", | |
"halt_if_type":"num", | |
"halt_if_compare":"is", | |
"override_topic":false, | |
"entity_id":"counter.echo_button_counter", | |
"state_type":"num", | |
"state_location":"payload", | |
"override_payload":"msg", | |
"entity_location":"data", | |
"override_data":"msg", | |
"blockInputOverrides":false, | |
"x":704, | |
"y":199, | |
"wires":[ | |
[ | |
"4c3ece5f.7a3" | |
], | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"4c3ece5f.7a3", | |
"type":"api-call-service", | |
"z":"cceabdf6.2a569", | |
"name":"TurnOffKidsLights", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"debugenabled":false, | |
"service_domain":"light", | |
"service":"toggle", | |
"entityId":"light.kids_room_lights", | |
"data":"", | |
"dataType":"json", | |
"mergecontext":"", | |
"output_location":"", | |
"output_location_type":"none", | |
"mustacheAltTags":false, | |
"x":937, | |
"y":148, | |
"wires":[ | |
[ | |
"fb16ddcc.35bae" | |
] | |
] | |
}, | |
{ | |
"id":"fb16ddcc.35bae", | |
"type":"api-call-service", | |
"z":"cceabdf6.2a569", | |
"name":"ResetCounter", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"debugenabled":false, | |
"service_domain":"counter", | |
"service":"reset", | |
"entityId":"counter.echo_button_counter", | |
"data":"", | |
"dataType":"json", | |
"mergecontext":"", | |
"output_location":"", | |
"output_location_type":"none", | |
"mustacheAltTags":false, | |
"x":1200.5, | |
"y":215, | |
"wires":[ | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"4debd629.a9b888", | |
"type":"api-current-state", | |
"z":"cceabdf6.2a569", | |
"name":"3 Counter", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"outputs":2, | |
"halt_if":"3", | |
"halt_if_type":"num", | |
"halt_if_compare":"is", | |
"override_topic":false, | |
"entity_id":"counter.echo_button_counter", | |
"state_type":"num", | |
"state_location":"payload", | |
"override_payload":"msg", | |
"entity_location":"data", | |
"override_data":"msg", | |
"blockInputOverrides":false, | |
"x":719, | |
"y":274, | |
"wires":[ | |
[ | |
"9ccbcd2b.5ae6d" | |
], | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"9ccbcd2b.5ae6d", | |
"type":"api-call-service", | |
"z":"cceabdf6.2a569", | |
"name":"TurnOffBedroomLights", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"debugenabled":false, | |
"service_domain":"light", | |
"service":"toggle", | |
"entityId":"light.bedroom", | |
"data":"", | |
"dataType":"json", | |
"mergecontext":"", | |
"output_location":"", | |
"output_location_type":"none", | |
"mustacheAltTags":false, | |
"x":954, | |
"y":220, | |
"wires":[ | |
[ | |
"fb16ddcc.35bae" | |
] | |
] | |
}, | |
{ | |
"id":"c6f5eeb0.60df4", | |
"type":"api-current-state", | |
"z":"cceabdf6.2a569", | |
"name":"4 counter", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"outputs":2, | |
"halt_if":"4", | |
"halt_if_type":"num", | |
"halt_if_compare":"is", | |
"override_topic":false, | |
"entity_id":"counter.echo_button_counter", | |
"state_type":"num", | |
"state_location":"payload", | |
"override_payload":"msg", | |
"entity_location":"data", | |
"override_data":"msg", | |
"blockInputOverrides":false, | |
"x":725, | |
"y":335, | |
"wires":[ | |
[ | |
"16162d41.762f73" | |
], | |
[ | |
] | |
] | |
}, | |
{ | |
"id":"16162d41.762f73", | |
"type":"api-call-service", | |
"z":"cceabdf6.2a569", | |
"name":"TurnOffAllLights", | |
"server":"96a3b63.8076b48", | |
"version":1, | |
"debugenabled":false, | |
"service_domain":"light", | |
"service":"toggle", | |
"entityId":"group.one_lights", | |
"data":"", | |
"dataType":"json", | |
"mergecontext":"", | |
"output_location":"", | |
"output_location_type":"none", | |
"mustacheAltTags":false, | |
"x":936, | |
"y":291, | |
"wires":[ | |
[ | |
"fb16ddcc.35bae" | |
] | |
] | |
}, | |
{ | |
"id":"96a3b63.8076b48", | |
"type":"server", | |
"z":"", | |
"name":"Home Assistant", | |
"legacy":false, | |
"addon":false, | |
"rejectUnauthorizedCerts":true, | |
"ha_boolean":"y|yes|true|on|home|open", | |
"connectionDelay":true, | |
"cacheJson":true | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment