-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkitchenlights
1 lines (1 loc) · 4.78 KB
/
kitchenlights
1
[{"id":"8c753717.876d78","type":"tab","label":"alexa","disabled":false,"info":""},{"id":"c9cb5776.034ef8","type":"api-call-service","z":"8c753717.876d78","name":"kitchen off","server":"ceea5ac5.1b1658","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.kitchen_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":740,"y":380,"wires":[[]]},{"id":"e8e6513b.43b1e","type":"switch","z":"8c753717.876d78","name":"Notification Response","property":"payload.event.event_response","propertyType":"msg","rules":[{"t":"eq","v":"ResponseYes","vt":"str"},{"t":"eq","v":"ResponseNo","vt":"str"},{"t":"eq","v":"ResponseNone","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":540,"y":380,"wires":[["c9cb5776.034ef8"],[],["c9cb5776.034ef8"]]},{"id":"935da565.4e0958","type":"switch","z":"8c753717.876d78","name":"Event ID LIST","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"kitchen","vt":"str"},{"t":"eq","v":"barbbed","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":380,"wires":[["e8e6513b.43b1e"],[]]},{"id":"ef68ab29.b75c68","type":"server-events","z":"8c753717.876d78","name":"Alexa Notification Response","server":"ceea5ac5.1b1658","event_type":"alexa_actionable_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":120,"y":380,"wires":[["935da565.4e0958"]]},{"id":"808dfef1.62413","type":"server-state-changed","z":"8c753717.876d78","name":"kitchen on","server":"ceea5ac5.1b1658","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.kitchen_light","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":80,"y":80,"wires":[["9796b695.b6ee88"],[]]},{"id":"9796b695.b6ee88","type":"trigger","z":"8c753717.876d78","name":"on for 30 minutes","op1":"","op2":"","op1type":"nul","op2type":"date","duration":"30","extend":true,"overrideDelay":false,"units":"min","reset":"ON","bytopic":"all","topic":"topic","outputs":1,"x":130,"y":200,"wires":[["6d4f46cf.973248"]]},{"id":"bb42c358.f7be6","type":"time-range-switch","z":"8c753717.876d78","name":"daytime","lat":"37.212537","lon":"-119.681740","startTime":"goldenHourEnd","endTime":"goldenHour","startOffset":0,"endOffset":0,"x":320,"y":80,"wires":[["4358ad32.8a99e4"],[]]},{"id":"e4ea9b90.990598","type":"comment","z":"8c753717.876d78","name":"another way to trigger at a time of day and for how long on. ","info":"","x":230,"y":40,"wires":[]},{"id":"8badd5a8.7f9738","type":"comment","z":"8c753717.876d78","name":"trigger node. if light is turned off and back on again the delay will reset","info":"","x":250,"y":160,"wires":[]},{"id":"4358ad32.8a99e4","type":"api-call-service","z":"8c753717.876d78","name":"Alexa kitchen notification","server":"ceea5ac5.1b1658","version":1,"debugenabled":true,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\" kitchen lights are on for 30 minutes. Would you like me to shut it off?\",\"event_id\":\"kitchen\",\"alexa_device\":\"media_player.kitchen_echo_dot\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":60,"wires":[[]]},{"id":"6f2c2fc4.bf712","type":"comment","z":"8c753717.876d78","name":"below is action that alexa takes ","info":"","x":330,"y":320,"wires":[]},{"id":"bd4cb245.94fc3","type":"comment","z":"8c753717.876d78","name":"list of events IDs to flow to devices","info":"","x":340,"y":438,"wires":[]},{"id":"6d4f46cf.973248","type":"api-current-state","z":"8c753717.876d78","name":"is light on?","server":"ceea5ac5.1b1658","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.kitchen_light","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":350,"y":200,"wires":[["bb42c358.f7be6"],[]]},{"id":"89d6d15d.94f64","type":"comment","z":"8c753717.876d78","name":"check if light is still on. without this the alexa will ask if light was shut off.","info":"","x":270,"y":260,"wires":[]},{"id":"ceea5ac5.1b1658","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]