Skip to content
John Tran edited this page Mar 21, 2022 · 54 revisions

Automation Examples

The examples are either in YAML, NodeRED or both. For those unfamiliar with YAML or NodeRed, please take a look at the Home Assistant Documentation for YAML and for NodeRed please checkout this great setup guide:


Comprehensive Flow for NodeRED includes event_person_id and cascading/rolling questions

Expand - NodeRed

Import the following JSON into your NodeRED installation.

[{"id":"9e1564a5.5dedf8","type":"tab","label":"Alexa Actionable Notifications","disabled":false,"info":""},{"id":"e8e465bd.9ca068","type":"server-events","z":"9e1564a5.5dedf8","name":"Alexa Actionable Notification","event_type":"alexa_actionable_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":300,"y":520,"wires":[["94bde3c5.04f55","ecc5b99b.3a5f68"]]},{"id":"94bde3c5.04f55","type":"switch","z":"9e1564a5.5dedf8","name":"Event IDs","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"actionable_notification_event_name","vt":"str"},{"t":"eq","v":"actionable_notification_another_name","vt":"str"},{"t":"eq","v":"actionable_notification_event_cascade1","vt":"str"},{"t":"eq","v":"actionable_notification_event_cascade2","vt":"str"},{"t":"eq","v":"more","vt":"str"},{"t":"eq","v":"even more","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":500,"y":520,"wires":[["356dec7b.3d22f4"],["9c426fc9.b7848"],["84f2708f.a6f4c"],["7e688503.69479c"],[],[]]},{"id":"9ce943c1.c50e2","type":"link in","z":"9e1564a5.5dedf8","name":"1","links":["356dec7b.3d22f4"],"x":1155,"y":400,"wires":[["cb54ff18.9ad77"]]},{"id":"356dec7b.3d22f4","type":"link out","z":"9e1564a5.5dedf8","name":"1","links":["9ce943c1.c50e2"],"x":615,"y":480,"wires":[]},{"id":"b33be835.caea98","type":"bigtimer","z":"9e1564a5.5dedf8","outtopic":"","outpayload1":"On","outpayload2":"","name":"Timer Based","comment":"","starttime":"720","endtime":"0","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":610,"y":760,"wires":[["2498f346.78cf1c"],[],[]]},{"id":"2498f346.78cf1c","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Ask","version":1,"debugenabled":false,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\"Place a Question Here\",\"event_id\":\"actionable_notification_another_name\",\"alexa_device\":\"media_player.which_alexa_device_you_want_to_talk\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":760,"wires":[[]]},{"id":"5c734398.43b32c","type":"switch","z":"9e1564a5.5dedf8","name":"Responses","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":1310,"y":740,"wires":[["ec2fc0d3.b2ca3"],["72483f78.8d72e"],["fdb3b4c7.aa54d8"]]},{"id":"9c426fc9.b7848","type":"link out","z":"9e1564a5.5dedf8","name":"2","links":["7932990.3d38a68"],"x":715,"y":500,"wires":[]},{"id":"7932990.3d38a68","type":"link in","z":"9e1564a5.5dedf8","name":"2","links":["9c426fc9.b7848"],"x":895,"y":920,"wires":[["cc8e8bd.f4c8f78"]]},{"id":"718683d5.3d8a6c","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Ask","version":1,"debugenabled":false,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\"Place a Question Here\",\"event_id\":\"actionable_notification_event_name\",\"alexa_device\":\"media_player.which_alexa_device_you_want_to_talk\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1390,"y":220,"wires":[[]]},{"id":"8f49fff3.29937","type":"server-state-changed","z":"9e1564a5.5dedf8","name":"What do you want to be the trigger","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":1040,"y":220,"wires":[["718683d5.3d8a6c"]]},{"id":"9a5742c9.962c1","type":"comment","z":"9e1564a5.5dedf8","name":"Copy these response portions as many times as needed, for as many automations that you want","info":"","x":1290,"y":340,"wires":[]},{"id":"3221144f.4d269c","type":"comment","z":"9e1564a5.5dedf8","name":"Change what happens for each response based on what you want to happen (call service, for example)","info":"","x":1570,"y":620,"wires":[]},{"id":"978f6e80.5b4a2","type":"comment","z":"9e1564a5.5dedf8","name":"Just add the specific EVENT_ID here that matches what is in the \"Ask\" node then pipe it out to its corrisponding \"Responses\" node","info":"","x":510,"y":420,"wires":[]},{"id":"c52e3ac1.3af5c8","type":"comment","z":"9e1564a5.5dedf8","name":"In the \"Ask\" node it gives directions on how to fill it out","info":"","x":1360,"y":140,"wires":[]},{"id":"9766338b.f7367","type":"comment","z":"9e1564a5.5dedf8","name":"Another example with a timer","info":"","x":700,"y":700,"wires":[]},{"id":"cc8e8bd.f4c8f78","type":"switch","z":"9e1564a5.5dedf8","name":"Person IDs","property":"payload.event.event_person_id","propertyType":"msg","rules":[{"t":"cont","v":"person1","vt":"str"},{"t":"cont","v":"person2","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1010,"y":920,"wires":[["5c734398.43b32c"],["a83e6e44.0f395"],["f8e32a35.030a88"]]},{"id":"6eaab5ea.999b5c","type":"comment","z":"9e1564a5.5dedf8","name":"Place the unique Person IDs here","info":"","x":990,"y":860,"wires":[]},{"id":"4ffc8e5b.edc7b","type":"comment","z":"9e1564a5.5dedf8","name":"A blank Person ID will allow a response from anyone","info":"","x":990,"y":1000,"wires":[]},{"id":"ecc5b99b.3a5f68","type":"debug","z":"9e1564a5.5dedf8","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":250,"y":600,"wires":[]},{"id":"a078b806.e34408","type":"comment","z":"9e1564a5.5dedf8","name":"Debug node is only needed to get the exact Person ID","info":"","x":260,"y":660,"wires":[]},{"id":"259846d3.252a2a","type":"comment","z":"9e1564a5.5dedf8","name":"Once IDs are obtained for each person this node can be deleted","info":"","x":290,"y":700,"wires":[]},{"id":"ec2fc0d3.b2ca3","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when YES is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1560,"y":700,"wires":[[]]},{"id":"72483f78.8d72e","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NO is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1560,"y":740,"wires":[[]]},{"id":"fdb3b4c7.aa54d8","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NOTHING is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1580,"y":780,"wires":[[]]},{"id":"cb54ff18.9ad77","type":"switch","z":"9e1564a5.5dedf8","name":"Responses","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":1270,"y":400,"wires":[["d71555bd.f5f268"],["e4e577f1.64c108"],["6d00e6be.74b978"]]},{"id":"d71555bd.f5f268","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when YES is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1580,"y":380,"wires":[[]]},{"id":"e4e577f1.64c108","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NO is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1580,"y":420,"wires":[[]]},{"id":"6d00e6be.74b978","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NOTHING is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1600,"y":460,"wires":[[]]},{"id":"a83e6e44.0f395","type":"switch","z":"9e1564a5.5dedf8","name":"Responses","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":1310,"y":880,"wires":[["a67d39f.a80bcc8"],["96c36869.9e45c8"],["745dc5d2.7e02dc"]]},{"id":"a67d39f.a80bcc8","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when YES is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1670,"y":880,"wires":[[]]},{"id":"96c36869.9e45c8","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NO is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1670,"y":920,"wires":[[]]},{"id":"745dc5d2.7e02dc","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NOTHING is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1690,"y":960,"wires":[[]]},{"id":"f8e32a35.030a88","type":"switch","z":"9e1564a5.5dedf8","name":"Responses","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":1310,"y":1040,"wires":[["268e2b55.3a7774"],["b20548d9.1e47b8"],["74e41dc1.698424"]]},{"id":"268e2b55.3a7774","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when YES is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1670,"y":1040,"wires":[[]]},{"id":"b20548d9.1e47b8","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NO is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1670,"y":1080,"wires":[[]]},{"id":"74e41dc1.698424","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NOTHING is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1690,"y":1120,"wires":[[]]},{"id":"5306f336.bf6a0c","type":"comment","z":"9e1564a5.5dedf8","name":"Cascade example","info":"","x":410,"y":1120,"wires":[]},{"id":"3867528f.c91afe","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Ask","version":1,"debugenabled":false,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\"Place a Question Here\",\"event_id\":\"actionable_notification_event_cascade1\",\"alexa_device\":\"media_player.which_alexa_device_you_want_to_talk_first\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":470,"y":1200,"wires":[[]]},{"id":"9ed85d5a.e0198","type":"server-state-changed","z":"9e1564a5.5dedf8","name":"What do you want to be the trigger","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":240,"y":1200,"wires":[["3867528f.c91afe"]]},{"id":"84f2708f.a6f4c","type":"link out","z":"9e1564a5.5dedf8","name":"3","links":["290374.08c3cc8c"],"x":735,"y":560,"wires":[]},{"id":"290374.08c3cc8c","type":"link in","z":"9e1564a5.5dedf8","name":"3","links":["84f2708f.a6f4c"],"x":155,"y":1320,"wires":[["e5146555.7ae938"]]},{"id":"e5146555.7ae938","type":"switch","z":"9e1564a5.5dedf8","name":"Responses","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":265,"y":1320,"wires":[["e02da016.2857a"],["fab1c89.e77d338"],["40ef28de.8ff108"]]},{"id":"e02da016.2857a","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when YES is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":1280,"wires":[[]]},{"id":"fab1c89.e77d338","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NO is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":535,"y":1340,"wires":[[]]},{"id":"40ef28de.8ff108","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Ask","version":1,"debugenabled":false,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\"Place a Question Here\",\"event_id\":\"actionable_notification_event_cascade2\",\"alexa_device\":\"media_player.which_alexa_device_you_want_to_talk_second\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":465,"y":1400,"wires":[[]]},{"id":"7e688503.69479c","type":"link out","z":"9e1564a5.5dedf8","name":"4","links":["d663e33.1e2892"],"x":620,"y":620,"wires":[]},{"id":"d663e33.1e2892","type":"link in","z":"9e1564a5.5dedf8","name":"4","links":["7e688503.69479c"],"x":155,"y":1520,"wires":[["4f173254.8cff8c"]]},{"id":"4f173254.8cff8c","type":"switch","z":"9e1564a5.5dedf8","name":"Responses","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":270,"y":1520,"wires":[["caba0f26.8abb4"],["ba025071.18f6a"],["ed6d8299.bc3c6"]]},{"id":"caba0f26.8abb4","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when YES is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":555,"y":1460,"wires":[[]]},{"id":"ba025071.18f6a","type":"api-call-service","z":"9e1564a5.5dedf8","name":"What you want when NO is said","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":1520,"wires":[[]]},{"id":"ee0c058b.6e7af8","type":"comment","z":"9e1564a5.5dedf8","name":"Cascade first device","info":"","x":250,"y":1260,"wires":[]},{"id":"c1135b56.fea028","type":"comment","z":"9e1564a5.5dedf8","name":"Cascade second device","info":"","x":260,"y":1460,"wires":[]},{"id":"c490bd25.93f4d","type":"comment","z":"9e1564a5.5dedf8","name":"This example loops between two devices forever until it gets a response from one of them","info":"","x":370,"y":1620,"wires":[]},{"id":"ed6d8299.bc3c6","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Ask","version":1,"debugenabled":false,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\"Place a Question Here\",\"event_id\":\"actionable_notification_event_cascade1\",\"alexa_device\":\"media_player.which_alexa_device_you_want_to_talk_first\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":470,"y":1580,"wires":[[]]},{"id":"e37ba145.0eaaa","type":"comment","z":"9e1564a5.5dedf8","name":"Add more to extend loop","info":"","x":350,"y":1660,"wires":[]}]
Expand - NodeRed in German

Importiere das folgende JSON in Node-RED

[{"id":"e8e465bd.9ca068","type":"server-events","z":"9e1564a5.5dedf8","name":"Alexa Actionable Notification","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":220,"y":500,"wires":[["94bde3c5.04f55","ecc5b99b.3a5f68"]]},{"id":"94bde3c5.04f55","type":"switch","z":"9e1564a5.5dedf8","name":"Event IDs","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"eindeutigen_event_namen_1","vt":"str"},{"t":"eq","v":"eindeutigen_event_namen_2","vt":"str"},{"t":"eq","v":"verschachteltes_event_1","vt":"str"},{"t":"eq","v":"verschachteltes_event_2","vt":"str"},{"t":"eq","v":"more","vt":"str"},{"t":"eq","v":"even more","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":500,"y":520,"wires":[["356dec7b.3d22f4"],["9c426fc9.b7848"],["84f2708f.a6f4c"],["7e688503.69479c"],[],[]]},{"id":"9ce943c1.c50e2","type":"link in","z":"9e1564a5.5dedf8","name":"1","links":["356dec7b.3d22f4"],"x":1155,"y":260,"wires":[["cb54ff18.9ad77"]]},{"id":"356dec7b.3d22f4","type":"link out","z":"9e1564a5.5dedf8","name":"1","links":["9ce943c1.c50e2"],"x":615,"y":480,"wires":[]},{"id":"9c426fc9.b7848","type":"link out","z":"9e1564a5.5dedf8","name":"2","links":["7932990.3d38a68"],"x":715,"y":500,"wires":[]},{"id":"7932990.3d38a68","type":"link in","z":"9e1564a5.5dedf8","name":"2","links":["9c426fc9.b7848"],"x":855,"y":680,"wires":[["cc8e8bd.f4c8f78"]]},{"id":"718683d5.3d8a6c","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Frage","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"eindeutigen_event_namen_1\",\"alexa_device\":\"media_player.welches_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":530,"y":180,"wires":[[]]},{"id":"8f49fff3.29937","type":"server-state-changed","z":"9e1564a5.5dedf8","name":"Was soll dein Trigger sein?","server":"5a3777c7.b71588","entityidfilter":"sensor.bad_bewegung_batterie","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"100","halt_if_type":"str","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"x":150,"y":180,"wires":[["718683d5.3d8a6c"],[]]},{"id":"9a5742c9.962c1","type":"comment","z":"9e1564a5.5dedf8","name":"Kopieren Sie diese Antwortteile so oft wie nötig, für so viele Automatisierungen, wie Sie wollen","info":"","x":1280,"y":200,"wires":[]},{"id":"3221144f.4d269c","type":"comment","z":"9e1564a5.5dedf8","name":"Ändern Sie, was bei jeder Antwort passiert, je nachdem, was passieren soll (z. B. call service)","info":"","x":1540,"y":620,"wires":[]},{"id":"978f6e80.5b4a2","type":"comment","z":"9e1564a5.5dedf8","name":"Definiere hier den eindeutigen EventName und kümmere dich dann um die entsprechenden Antworten","info":"","x":430,"y":420,"wires":[]},{"id":"c52e3ac1.3af5c8","type":"comment","z":"9e1564a5.5dedf8","name":"Die \"Frage\" Node zeigt ein Beispiel, wie das Script aufgerufen werden soll","info":"","x":300,"y":120,"wires":[]},{"id":"9766338b.f7367","type":"comment","z":"9e1564a5.5dedf8","name":"Anderes Beispiel mit einer wiederkehrenden Uhrzeit","info":"","x":230,"y":260,"wires":[]},{"id":"cc8e8bd.f4c8f78","type":"switch","z":"9e1564a5.5dedf8","name":"Person IDs","property":"payload.event.event_person_id","propertyType":"msg","rules":[{"t":"cont","v":"person1","vt":"str"},{"t":"cont","v":"person2","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":970,"y":680,"wires":[["3cf6a34a.bf0dac"],["6f82133c.8945e4"],["30f1b026.f2e15"]]},{"id":"6eaab5ea.999b5c","type":"comment","z":"9e1564a5.5dedf8","name":"Platzieren Sie hier die eindeutigen Personen-IDs","info":"","x":1000,"y":620,"wires":[]},{"id":"4ffc8e5b.edc7b","type":"comment","z":"9e1564a5.5dedf8","name":"Eine leere Personen-ID erlaubt eine Antwort von jedem","info":"","x":1000,"y":1000,"wires":[]},{"id":"ecc5b99b.3a5f68","type":"debug","z":"9e1564a5.5dedf8","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":250,"y":600,"wires":[]},{"id":"a078b806.e34408","type":"comment","z":"9e1564a5.5dedf8","name":"Der Debug-Node wird nur benötigt, um die genaue Personen-ID zu erhalten","info":"","x":320,"y":660,"wires":[]},{"id":"259846d3.252a2a","type":"comment","z":"9e1564a5.5dedf8","name":"Sobald die IDs für jede Person vorliegen, kann dieser Note gelöscht werden","info":"","x":320,"y":700,"wires":[]},{"id":"cb54ff18.9ad77","type":"switch","z":"9e1564a5.5dedf8","name":"Antworten","property":"payload.event.event_response_type","propertyType":"msg","rules":[{"t":"eq","v":"ResponseYes","vt":"str"},{"t":"eq","v":"ResponseNo","vt":"str"},{"t":"eq","v":"ResponseNone","vt":"str"},{"t":"eq","v":"ResponseNumeric","vt":"str"},{"t":"eq","v":"ResponseDuration","vt":"str"},{"t":"eq","v":"ResponseSelection","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":1260,"y":280,"wires":[["d71555bd.f5f268"],["e4e577f1.64c108"],["6d00e6be.74b978"],[],[],[]]},{"id":"d71555bd.f5f268","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1580,"y":240,"wires":[[]]},{"id":"e4e577f1.64c108","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1590,"y":280,"wires":[[]]},{"id":"6d00e6be.74b978","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NICHTS gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1600,"y":320,"wires":[[]]},{"id":"5306f336.bf6a0c","type":"comment","z":"9e1564a5.5dedf8","name":"Verschachteltes Beispiel","info":"","x":210,"y":1060,"wires":[]},{"id":"84f2708f.a6f4c","type":"link out","z":"9e1564a5.5dedf8","name":"3","links":["290374.08c3cc8c","2b0d2437.c5d884"],"x":735,"y":560,"wires":[]},{"id":"290374.08c3cc8c","type":"link in","z":"9e1564a5.5dedf8","name":"3","links":["84f2708f.a6f4c"],"x":155,"y":1320,"wires":[["3e310266.8eb59e"]]},{"id":"7e688503.69479c","type":"link out","z":"9e1564a5.5dedf8","name":"4","links":["d663e33.1e2892","354bdc78.b92734"],"x":620,"y":620,"wires":[]},{"id":"d663e33.1e2892","type":"link in","z":"9e1564a5.5dedf8","name":"4","links":["7e688503.69479c"],"x":155,"y":1520,"wires":[["4f173254.8cff8c"]]},{"id":"4f173254.8cff8c","type":"switch","z":"9e1564a5.5dedf8","name":"Antworten","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":260,"y":1520,"wires":[["b328a01f.569d88"],["297be55f.df4caa"],["23256cd0.443814"]]},{"id":"ee0c058b.6e7af8","type":"comment","z":"9e1564a5.5dedf8","name":"Verschachtelung 1. Gerät","info":"","x":270,"y":1260,"wires":[]},{"id":"c1135b56.fea028","type":"comment","z":"9e1564a5.5dedf8","name":"Verschachtelung 2. Gerät","info":"","x":270,"y":1460,"wires":[]},{"id":"c490bd25.93f4d","type":"comment","z":"9e1564a5.5dedf8","name":"Dieses Beispiel führt eine Endlosschleife zwischen zwei Geräten durch, bis es eine Antwort von einem der Geräte erhält","info":"","x":500,"y":1100,"wires":[]},{"id":"bd507ede.7d9348","type":"comment","z":"9e1564a5.5dedf8","name":"Fragebereich","info":"","x":100,"y":60,"wires":[]},{"id":"ae5d503f.42617","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Frage","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"eindeutigen_event_namen_2\",\"alexa_device\":\"media_player.welches_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":390,"y":320,"wires":[[]]},{"id":"3cf6a34a.bf0dac","type":"switch","z":"9e1564a5.5dedf8","name":"Antworten","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":1280,"y":700,"wires":[["2ac2b18e.92a1ee"],["11c296b6.6b5a89"],["2059fadf.4a7466"]]},{"id":"2ac2b18e.92a1ee","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1600,"y":680,"wires":[[]]},{"id":"11c296b6.6b5a89","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1620,"y":720,"wires":[[]]},{"id":"2059fadf.4a7466","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NICHTS gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1630,"y":760,"wires":[[]]},{"id":"6f82133c.8945e4","type":"switch","z":"9e1564a5.5dedf8","name":"Antworten","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":1280,"y":840,"wires":[["feb74c13.ef5f48"],["f284ba19.385ae"],["fb6dab75.6928e"]]},{"id":"feb74c13.ef5f48","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1600,"y":820,"wires":[[]]},{"id":"f284ba19.385ae","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1620,"y":860,"wires":[[]]},{"id":"fb6dab75.6928e","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NICHTS gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1630,"y":900,"wires":[[]]},{"id":"30f1b026.f2e15","type":"switch","z":"9e1564a5.5dedf8","name":"Antworten","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":1280,"y":1000,"wires":[["927724ef.b2e87"],["75a5c5a4.6f689c"],["59599ef0.e1b5f"]]},{"id":"927724ef.b2e87","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1600,"y":980,"wires":[[]]},{"id":"75a5c5a4.6f689c","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1620,"y":1020,"wires":[[]]},{"id":"59599ef0.e1b5f","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NICHTS gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":1630,"y":1060,"wires":[[]]},{"id":"7c62767b.7596e8","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Frage über 1. Gerät ","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"verschachteltes_event_1\",\"alexa_device\":\"media_player.welches_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":610,"y":1160,"wires":[[]]},{"id":"aac58a49.377548","type":"server-state-changed","z":"9e1564a5.5dedf8","name":"Was soll dein Trigger sein?","server":"5a3777c7.b71588","entityidfilter":"sensor.bad_bewegung_batterie","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"100","halt_if_type":"str","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"x":210,"y":1160,"wires":[["7c62767b.7596e8"],[]]},{"id":"3e310266.8eb59e","type":"switch","z":"9e1564a5.5dedf8","name":"Antworten","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":260,"y":1320,"wires":[["165268d9.335367"],["73d4d62e.bd0168"],["81c5e69.5422d98"]]},{"id":"165268d9.335367","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":540,"y":1300,"wires":[[]]},{"id":"73d4d62e.bd0168","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":550,"y":1340,"wires":[[]]},{"id":"81c5e69.5422d98","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Frage über Gerät 2","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"verschachteltes_event_2\",\"alexa_device\":\"media_player.welches_andere_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":630,"y":1400,"wires":[[]]},{"id":"b328a01f.569d88","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":540,"y":1460,"wires":[[]]},{"id":"297be55f.df4caa","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":550,"y":1500,"wires":[[]]},{"id":"23256cd0.443814","type":"api-call-service","z":"9e1564a5.5dedf8","name":"Frage über Gerät 1 wieder","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"verschachteltes_event_1\",\"alexa_device\":\"media_player.welches_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":660,"y":1560,"wires":[[]]},{"id":"baed71e1.43fbd","type":"inject","z":"9e1564a5.5dedf8","name":"um 12 Uhr","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 12 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":320,"wires":[["ae5d503f.42617"]]},{"id":"5a3777c7.b71588","type":"server","name":"Home Assistant","legacy":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]

ResponseYes Examples

Ask if lights should be turned off in bedroom if no motion in 30 mins.

Expand - YAML

automation:
  - alias: Bedroom lights left on for 30 minutes no motion detected
    trigger:
      platform: state
      entity_id: binary_sensor.bedroom_motion
      to: 'off'
      for:
        minutes: 30

    condition:
      - condition: state
        entity_id: light.bedroom_lights
        state: 'on'

    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'Is anyone in the bedroom?'
          event_id: 'alexa_notification_bedroom_occupied'
          alexa_device: 'media_player.bedroom_echo'

  - alias: No response for alexa_notification_bedroom_occupied question 
    trigger:
      platform: event
      event_type: alexa_actionable_notification
      event_data:
        event_id: alexa_notification_bedroom_occupied
        event_response_type: ResponseYes
    action:
      - service: light.turn_off
        entity_id: group.all_lights

Checks if garage is open past a certain time and asks if you want to close it.

Expand - NodeRED

What it looks like:

Import the following JSON into your NodeRed installation.

[{"id":"5a8efc97.c224f4","type":"api-call-service","z":"e8fe01ef.ddafd","name":"Alexa Actionable Notification - Garage Door OPEN","server":"9f230d2c.1e00d","version":1,"debugenabled":false,"service_domain":"script","service":"activate_alexa_actionable_notification","entityId":"","data":"{\"text\":\"Its getting late and the garage is still open. Would you like me to close it?\",\"event_id\":\"actionable_notification_garage\",\"alexa_device\":\"media_player.your_device\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":750,"y":1240,"wires":[[]]},{"id":"b81c86aa.cffd98","type":"api-current-state","z":"e8fe01ef.ddafd","name":"Is Garage Open?","server":"cf2d0f67.b78c5","version":1,"outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"cover.your_device","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":430,"y":1240,"wires":[["5a8efc97.c224f4"],[]]},{"id":"29219c0.fd93164","type":"inject","z":"e8fe01ef.ddafd","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"42 19 * * *","once":false,"onceDelay":0.1,"x":250,"y":1240,"wires":[["b81c86aa.cffd98"]]},{"id":"f2a004b3.987308","type":"api-call-service","z":"e8fe01ef.ddafd","name":"Garage Door - Close","server":"cf2d0f67.b78c5","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.your_device","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1020,"y":1360,"wires":[[]]},{"id":"1cc5f7ea.344078","type":"switch","z":"e8fe01ef.ddafd","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":780,"y":1360,"wires":[["f2a004b3.987308"],[],["f2a004b3.987308"]]},{"id":"1b3e6beb.9ca094","type":"switch","z":"e8fe01ef.ddafd","name":"Notification Check","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"actionable_notification_garage","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":550,"y":1360,"wires":[["1cc5f7ea.344078"]]},{"id":"4778008.13c87","type":"server-events","z":"e8fe01ef.ddafd","name":"Alexa Notification Response","server":"cf2d0f67.b78c5","event_type":"alexa_actionable_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":300,"y":1360,"wires":[["1b3e6beb.9ca094"]]},{"id":"9f230d2c.1e00d","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true},{"id":"cf2d0f67.b78c5","type":"server","z":"","name":"Home Assistant"}]

Ask if garage door should be closed at 9pm.

Expand - YAML

automation:
  - alias: Garage door opened at 9pm.
    trigger:
      platform: time
      # Military time format. This trigger will fire at 9pm
      at: "21:00:00"

    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'Its getting late and the garage is still open. Would you like me to close it?'
          event_id: 'actionable_notification_garage'
          alexa_device: 'media_player.living_room_echo'
   
  - alias: Yes response to alexa_cooling_set_sleep.
    trigger:
      platform: event
      event_type: alexa_actionable_notificaiton
      event_data:
        event_id: actionable_notification_garage
        event_response_type: ResponseYes

    action:
      - service: cover.close_cover
        entity_id: cover.garage_door

ResponseNo Examples

None here yet. Drop a line in the #alexa-notifications channel with suggestions.


ResponseNone Examples

Turn off lights when no one responds.

Expand - YAML

automation:
  - alias: Turn off the lights if no one responds to at home question
    trigger:
      platform: state
      entity_id: group.people
      to: 'off'
      for:
        minutes: 5

    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'Is anyone home?'
          event_id: 'alexa_notification_anyone_home'
          alexa_device: 'media_player.living_room_echo'

  - alias: No response for alexa_notification_anyone_home question 
    trigger:
      platform: event
      event_type: alexa_actionable_notification
      event_data:
        event_id: alexa_notification_anyone_home
        event_response_type: ResponseNone

    action:
      - service: light.turn_off
        entity_id: group.all_lights

ResponseDuration Examples

Lock the door after a specific duration

Expand - YAML

automation:
  - alias: Lock the door after a specific duration
    trigger:
      platform: state
      entity_id: lock.front_door
      to: 'unlocked'
      for:
        minutes: 5
    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'Would you like me to lock the front door?'
          event_id: 'lock_front_door'
          alexa_device: 'media_player.living_room_echo'

  - alias: Numeric response to lock_front_door.
    trigger:
      platform: event
      event_type: alexa_actionable_notificaiton
      event_data:
        event_id: lock_front_door
        event_response_type: ResponseDuration

    action:
      - delay: 
          seconds: "{{ trigger.event.data.event_response | int }}"
      - service: lock.lock
        entity_id: lock.front_door

ResponseNumeric Examples

Set cooling temperature when you go to sleep.

Expand - YAML

automation:
  - alias: Going to sleep set the thermostat temperature.
    trigger:
      platform: state
      entity_id: group.people_sleep
      to: 'on'
      
    condition:
      - condition: state
        entity_id: climate.building_36_technologies_unknown_type_0001_id_0001_mode
        state: 'cool'
        
    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'For bedtime, what would you like me to set the thermostat to?'
          event_id: 'alexa_cooling_set_sleep'
          alexa_device: 'media_player.bedroom_echo'

  - alias: Yes response to alexa_cooling_set_sleep.
    trigger:
      platform: event
      event_type: alexa_actionable_notificaiton
      event_data:
        event_id: alexa.cooling.sleep.set
        event_response_type: ResponseNumeric

    action:
      - service: climate.set_temperature
        entity_id: climate.thermostat
        data: 
          temperature: "{{ trigger.event.data.event_response }}"

ResponseSelect Examples

When the TV turns on, ask what you want to watch (Netflix, Hulu, YouTube)

Expand - YAML

automation:
  - alias: When the TV turns on, ask what you want to watch (Netflix, Hulu, YouTube) 
    trigger:
      platform: state
      entity_id: media_player.tv
      to: 'on'
    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'I noticed the TV was turned on, what would you like to play, Netflix, Hulu or YouTube?'
          event_id: 'alexa_notification_media_tv_select'
          alexa_device: 'media_player.living_room_echo'

  - alias: TV turned on and user wants Netflix
    trigger:
      platform: event
      event_type: alexa_actionable_notification
      event_data:
        event_id: alexa_notification_media_tv_select
    action:
      - service: media_player.select_source
        entity_id: media_player.tv
        data_template:
          source: "{{ trigger.event.data.event_response }}"

Beispiele auf Deutsch

  • Wenn die Rollladen runtergehen, frage ob das Licht ausgehen soll
  • Wenn der Fernseher an ist, frage ob das TV-Licht angeht
  • Wenn es Dunkel wird und der Schlüssel nicht am Schlüsselkasten ist, frage ob du nochmal erinnert werden möchtest
  • Wenn Tonnen raus müssen, frage ob ich dich nochmal erinnern soll
  • Wenn es drinnen zu heiß ist, frage auf wieviel Prozent die Lüftungsanlage laufen soll
  • Wenn über das eine Alexa-Gerät nicht reagiert wird, schicke die Frage an ein zweites Alexa-Gerät
  • Erklärt auch noch in folgendem Video: https://youtu.be/z7Blme2VZBM
Expand - Node-RED

[{"id":"ac213dd0.89fb88","type":"server-events","z":"ecfbc36b.05e3a8","name":"Alexa Actionable Notification","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":720,"y":120,"wires":[["47db861c.07cc28"]]},{"id":"47db861c.07cc28","type":"switch","z":"ecfbc36b.05e3a8","name":"Büro-Licht-Event","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"actionable_notification_buero_lichter","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":990,"y":120,"wires":[["2eb022a4.b5175e"]]},{"id":"81b07073.412ff","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frag ob Büro-Lichter an","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Soll ich Licht an machen?\",\"event_id\":\"actionable_notification_buero_lichter\",\"alexa_device\":\"media_player.kinder_dot\"}","mergecontext":"","output_location":"","output_location_type":"none","x":430,"y":120,"wires":[[]]},{"id":"2eb022a4.b5175e","type":"switch","z":"ecfbc36b.05e3a8","name":"Antworten","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":1260,"y":120,"wires":[["a197e6ae.c50e5"],[],[]]},{"id":"73efd54a.ac1e1c","type":"server-state-changed","z":"ecfbc36b.05e3a8","name":"Rollo geschlossen","server":"5a3777c7.b71588","entityidfilter":"cover.buero_rollo","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":160,"y":120,"wires":[[],["81b07073.412ff"]]},{"id":"a197e6ae.c50e5","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Bürolicht an","server":"5a3777c7.b71588","service_domain":"switch","service":"turn_on","data":"{\"entity_id\":\"switch.buero_lampe\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1450,"y":120,"wires":[[]]},{"id":"b33ed311.5af068","type":"comment","z":"ecfbc36b.05e3a8","name":"Rollos gehen runter, Licht an?","info":"","x":160,"y":20,"wires":[]},{"id":"698d47f4.d7e5b8","type":"trigger-state","z":"ecfbc36b.05e3a8","name":"FireTV start playing","server":"5a3777c7.b71588","entityid":"media_player.wz_firetvstick","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"d8tfzixrj9","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"playing"},{"id":"s2pnqwqlcp","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"idle"}],"outputs":2,"customoutputs":[],"outputinitially":true,"state_type":"str","x":170,"y":340,"wires":[["9b09ed22.e456a"],[]]},{"id":"9b09ed22.e456a","type":"time-range-switch","z":"ecfbc36b.05e3a8","name":"","lat":"1","lon":"1","startTime":"nauticalDusk","endTime":"nadir","startOffset":0,"endOffset":0,"x":390,"y":340,"wires":[["6e278b14.b1e9ac"],[]]},{"id":"e30c4c6f.deffe8","type":"suncron","z":"ecfbc36b.05e3a8","name":"Nautical Dusk starts","lat":"1","lon":"1","replay":false,"ejectScheduleOnUpdate":false,"sunrisePayload":"","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"start","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":160,"y":420,"wires":[["69780107.5c653"]]},{"id":"239905cb.626e32","type":"comment","z":"ecfbc36b.05e3a8","name":"Lichtsituation beim Fernsehgucken, nach Rückfrage von Alexa","info":"","x":260,"y":260,"wires":[]},{"id":"69780107.5c653","type":"api-current-state","z":"ecfbc36b.05e3a8","name":"FireTV spielt","server":"5a3777c7.b71588","outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.wz_firetvstick","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":360,"y":420,"wires":[[],["6e278b14.b1e9ac"]]},{"id":"6e278b14.b1e9ac","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frag ob TV-Lichter an","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Soll ich TV-Licht an machen?\",\"event_id\":\"actionable_notification_tv_lichter_demo\",\"alexa_device\":\"media_player.media_player.kinder_dot\"}","mergecontext":"","output_location":"","output_location_type":"none","x":640,"y":380,"wires":[[]]},{"id":"8141c755.0d0808","type":"server-events","z":"ecfbc36b.05e3a8","name":"Alexa Actionable Notification","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":930,"y":380,"wires":[["7db11d5f.d40fe4"]]},{"id":"7db11d5f.d40fe4","type":"switch","z":"ecfbc36b.05e3a8","name":"TV-Licht-Event","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"actionable_notification_tv_lichter:demo","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1150,"y":380,"wires":[["4dae80e6.3bab8"]]},{"id":"4dae80e6.3bab8","type":"switch","z":"ecfbc36b.05e3a8","name":"Antworten","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":1340,"y":380,"wires":[["1cad884b.9db3b"],[],[]]},{"id":"1cad884b.9db3b","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Bürolicht an","server":"5a3777c7.b71588","service_domain":"switch","service":"turn_on","data":"{\"entity_id\":\"switch.buero_lampe\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1530,"y":360,"wires":[[]]},{"id":"2900e695.02dfd2","type":"suncron","z":"ecfbc36b.05e3a8","name":"Dusk - start","lat":"1","lon":"1","replay":false,"ejectScheduleOnUpdate":false,"sunrisePayload":"","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"on","duskPayloadType":"str","duskTopic":"","duskOffsetType":"-1","duskOffsetHours":0,"duskOffsetMinutes":"30","duskOffset":"1800","nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":110,"y":560,"wires":[["1303f2a6.581b75"]]},{"id":"7ebaf429.d97744","type":"comment","z":"ecfbc36b.05e3a8","name":"Zur Dämmerung Schlüssel am Board?","info":"","x":190,"y":520,"wires":[]},{"id":"1303f2a6.581b75","type":"api-current-state","z":"ecfbc36b.05e3a8","name":"Schuppen Schlüssel nicht am Board?","server":"5a3777c7.b71588","outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.flur_schluessel_schuppen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":410,"y":560,"wires":[[],["bd65d75c.5f1df8"]]},{"id":"bd65d75c.5f1df8","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Schuppenschlüssel fehlt - Erinnern?","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Der Schuppen scheint nicht abgeschlossen zu sein. Soll ich euch noch mal erinnern?\",\"event_id\":\"schuppenschluessel_demo\",\"alexa_device\":\"media_player.media_player.kinder_dot\"}","mergecontext":"","output_location":"","output_location_type":"none","x":810,"y":560,"wires":[[]]},{"id":"41d5a76d.f488a8","type":"server-events","z":"ecfbc36b.05e3a8","name":"Fetch Antworten an Alexa","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":790,"y":640,"wires":[["2fb18f3f.8b0cc8"]]},{"id":"2fb18f3f.8b0cc8","type":"switch","z":"ecfbc36b.05e3a8","name":"Schuppenschlüssel-Thema","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"schuppenschluessel_demo","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1080,"y":640,"wires":[["9672a4b9.9c9cc8"]]},{"id":"9672a4b9.9c9cc8","type":"switch","z":"ecfbc36b.05e3a8","name":"Welche Antwort?","property":"payload.event.event_response_type","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":1330,"y":640,"wires":[["9dd561c0.120c88"],[],["55266be7.f53c34"]]},{"id":"852ef775.0cc3c8","type":"comment","z":"ecfbc36b.05e3a8","name":"Alexa mit Antwortfunktion (m. Quelle)","info":"https://github.com/keatontaylor/alexa-actions","x":810,"y":520,"wires":[]},{"id":"9dd561c0.120c88","type":"delay","z":"ecfbc36b.05e3a8","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1200,"y":560,"wires":[["1303f2a6.581b75"]]},{"id":"55266be7.f53c34","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Msg an Tristan Handy - Schlüssel fehlt","server":"5a3777c7.b71588","service_domain":"notify","service":"mobile_app_iphone_von_tristan_ha","data":"{\"message\":\"Der Schuppenschlüssel hängt nicht am Board\",\"title\":\"Wichtige Nachricht vom Schuppen!\",\"data\":{\"type\":\"announce\",\"method\":\"all\",\"push\":{\"thread-id\":\"Schuppenschlüssel\"}}}","mergecontext":"","output_location":"","output_location_type":"none","x":1650,"y":620,"wires":[[]]},{"id":"f997fab9.7ec55","type":"inject","z":"ecfbc36b.05e3a8","name":"18:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 18 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":880,"wires":[["c116ae3a.a50d88"]]},{"id":"c116ae3a.a50d88","type":"api-current-state","z":"ecfbc36b.05e3a8","name":"Restliche Tonnen heute","server":"5a3777c7.b71588","outputs":2,"halt_if":"Restlichen Tonnen in 0 Tag(en)","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.restlichen_tonnen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":360,"y":880,"wires":[[],["223fe3b8.7448cc","cae628e4.e4334","b31c66c7.71b5e8"]]},{"id":"e714e372.d95b58","type":"comment","z":"ecfbc36b.05e3a8","name":"Nachfrage für Tonnentermin","info":"","x":160,"y":820,"wires":[]},{"id":"223fe3b8.7448cc","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Esstisch 1+3 gelb","server":"5a3777c7.b71588","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.esstisch_3, light.esstisch_1_bunt\",\"brightness\":255,\"hs_color\":[60.314,74.902]}","mergecontext":"","output_location":"","output_location_type":"none","x":590,"y":960,"wires":[[]]},{"id":"b31c66c7.71b5e8","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frag ob Erinnerung restl. Tonnen","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Habt ihr die restlichen Tonnen schon rausgestellt? Erneute Erinnerung in 30 Minuten?\",\"event_id\":\"actionable_notification_restliche_tonnen_demo\",\"alexa_device\":\"media_player.kinder_dot\"}","mergecontext":"","output_location":"","output_location_type":"none","x":820,"y":840,"wires":[[]]},{"id":"fb481cdc.fe2468","type":"server-events","z":"ecfbc36b.05e3a8","name":"Alexa Actionable Notification","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":1140,"y":840,"wires":[["ab139760.534878"]]},{"id":"ab139760.534878","type":"switch","z":"ecfbc36b.05e3a8","name":"Restliche-Tonnen-Event","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"actionable_notification_restliche_tonnen_demo","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1410,"y":840,"wires":[["40ce2756.fc4b"]]},{"id":"40ce2756.fc4b","type":"switch","z":"ecfbc36b.05e3a8","name":"Responses","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":1670,"y":840,"wires":[["63c6182e.0be568"],[],[]]},{"id":"63c6182e.0be568","type":"delay","z":"ecfbc36b.05e3a8","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1190,"y":780,"wires":[["b31c66c7.71b5e8"]]},{"id":"cae628e4.e4334","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Msg an Tristan Handy - Restl. Tonne raus stellen","server":"5a3777c7.b71588","service_domain":"notify","service":"mobile_app_iphone_von_tristan_ha","data":"{\"message\":\"Hast du schon die restlichen Tonnen rausgestellt?\",\"title\":\"Wichtige Nachricht von den Tonnen!\",\"data\":{\"type\":\"announce\",\"method\":\"all\",\"push\":{\"thread-id\":\"Tonnen\"}}}","mergecontext":"","output_location":"","output_location_type":"none","x":690,"y":1000,"wires":[[]]},{"id":"8f81b1f9.720e88","type":"trigger-state","z":"ecfbc36b.05e3a8","name":"Temperaturunterschied","server":"5a3777c7.b71588","entityid":"sensor.pluggit_aussentemperatur","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"scs74n455z","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"<=","comparatorValueDatatype":"num","comparatorValue":"19"},{"id":"iqxbps8gmw","targetType":"entity_id","targetValue":"sensor.buero_temperatur","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":">=","comparatorValueDatatype":"num","comparatorValue":"22"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":170,"y":1140,"wires":[["f1361b15.fbfef8"],[]]},{"id":"57c38c85.03200c","type":"comment","z":"ecfbc36b.05e3a8","name":"Lüftungsanlage voll Pulle, wenn zu warm im Haus","info":"","x":240,"y":1080,"wires":[]},{"id":"f1361b15.fbfef8","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frag, welche Stufe Lüftungsanlage an","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Es ist zu heiß! Mit wieviel Prozent soll die Lüftungsanlage loslegen?\",\"event_id\":\"actionable_notification_lueftungsanlage\",\"alexa_device\":\"media_player.kinder_dot\"}","mergecontext":"","output_location":"","output_location_type":"none","x":530,"y":1140,"wires":[[]]},{"id":"3b06ae8c.ab155a","type":"comment","z":"ecfbc36b.05e3a8","name":"Verschachteltes Beispiel","info":"","x":170,"y":1320,"wires":[]},{"id":"e07cfb7b.a58a38","type":"comment","z":"ecfbc36b.05e3a8","name":"Dieses Beispiel führt eine Endlosschleife zwischen zwei Geräten durch, bis es eine Antwort von einem der Geräte erhält","info":"","x":460,"y":1360,"wires":[]},{"id":"d67a6a52.479678","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frage über 1. Gerät ","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"verschachteltes_event_1\",\"alexa_device\":\"media_player.welches_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":570,"y":1420,"wires":[[]]},{"id":"b20b630a.7ee408","type":"server-state-changed","z":"ecfbc36b.05e3a8","name":"Was soll dein Trigger sein?","server":"5a3777c7.b71588","entityidfilter":"sensor.bad_bewegung_batterie","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"100","halt_if_type":"str","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"x":170,"y":1420,"wires":[["d67a6a52.479678"],[]]},{"id":"1e925181.53322e","type":"server-events","z":"ecfbc36b.05e3a8","name":"Alexa Actionable Notification","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":180,"y":1480,"wires":[["7e08f189.1a5698"]]},{"id":"7e08f189.1a5698","type":"switch","z":"ecfbc36b.05e3a8","name":"Event IDs","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"eindeutigen_event_namen_1","vt":"str"},{"t":"eq","v":"eindeutigen_event_namen_2","vt":"str"},{"t":"eq","v":"verschachteltes_event_1","vt":"str"},{"t":"eq","v":"verschachteltes_event_2","vt":"str"},{"t":"eq","v":"more","vt":"str"},{"t":"eq","v":"even more","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":200,"y":1700,"wires":[[],[],["74a5ddbe.9e459c"],["2f598bc5.b632f4"],[],[]]},{"id":"2f598bc5.b632f4","type":"switch","z":"ecfbc36b.05e3a8","name":"Antworten","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":1800,"wires":[["b42087e7.0f0f4"],["d0ce54e5.d778d"],["5323b20d.d45fa4"]]},{"id":"3d9d9567.104042","type":"comment","z":"ecfbc36b.05e3a8","name":"Verschachtelung 1. Gerät","info":"","x":550,"y":1540,"wires":[]},{"id":"af4dd53d.a43008","type":"comment","z":"ecfbc36b.05e3a8","name":"Verschachtelung 2. Gerät","info":"","x":550,"y":1740,"wires":[]},{"id":"74a5ddbe.9e459c","type":"switch","z":"ecfbc36b.05e3a8","name":"Antworten","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":1600,"wires":[["48227979.90073"],["34d5f987.a142ae"],["a9d7a290.96ea78"]]},{"id":"48227979.90073","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":820,"y":1580,"wires":[[]]},{"id":"34d5f987.a142ae","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":830,"y":1620,"wires":[[]]},{"id":"a9d7a290.96ea78","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frage über Gerät 2","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"verschachteltes_event_2\",\"alexa_device\":\"media_player.welches_andere_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":770,"y":1680,"wires":[[]]},{"id":"b42087e7.0f0f4","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Was passiert, wenn JA gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":820,"y":1740,"wires":[[]]},{"id":"d0ce54e5.d778d","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Was passiert, wenn NEIN gesagt wird","server":"5a3777c7.b71588","service_domain":"","service":"","data":"","mergecontext":"","output_location":"","output_location_type":"none","x":830,"y":1780,"wires":[[]]},{"id":"5323b20d.d45fa4","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Frage über Gerät 1 wieder","server":"5a3777c7.b71588","service_domain":"script","service":"activate_alexa_actionable_notification","data":"{\"text\":\"Füge hier deine Frage ein!\",\"event_id\":\"verschachteltes_event_1\",\"alexa_device\":\"media_player.welches_alexa_gerät_soll_genutzt_werden\"}","mergecontext":"","output_location":"","output_location_type":"none","x":680,"y":1900,"wires":[[]]},{"id":"6cfc8179.2079f","type":"server-events","z":"ecfbc36b.05e3a8","name":"Alexa Actionable Notification","server":"5a3777c7.b71588","event_type":"alexa_actionable_notification","x":840,"y":1140,"wires":[["31fbc222.59be2e"]]},{"id":"31fbc222.59be2e","type":"switch","z":"ecfbc36b.05e3a8","name":"Lüftungsanlage-Event","property":"payload.event.event_id","propertyType":"msg","rules":[{"t":"eq","v":"actionable_notification_lueftungsanlage","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1100,"y":1140,"wires":[["2d4e087b.872d1"]]},{"id":"2d4e087b.872d1","type":"switch","z":"ecfbc36b.05e3a8","name":"Antworten","property":"payload.event.event_response_type","propertyType":"msg","rules":[{"t":"eq","v":"ResponseYes","vt":"str"},{"t":"eq","v":"ResponseNo","vt":"str"},{"t":"eq","v":"ResponseNone","vt":"str"},{"t":"eq","v":"ResponseNumeric","vt":"str"},{"t":"eq","v":"ResponseDuration","vt":"str"},{"t":"eq","v":"ResponseSelection","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":1380,"y":1160,"wires":[[],[],[],["369329c1.2e211e"],[],[]]},{"id":"369329c1.2e211e","type":"api-call-service","z":"ecfbc36b.05e3a8","name":"Stufe einstellen","server":"5a3777c7.b71588","service_domain":"fan","service":"set_percentage","data":"{\"entity_id\":\"fan.pluggit_fan\",\"percentage\":\"payload.event.event_response\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1660,"y":1160,"wires":[[]]},{"id":"5a3777c7.b71588","type":"server","name":"Home Assistant","legacy":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]