Gestion Alarme Via Node-red

Bonjour,

Cela fait un moment que je veux réintégrer mon alarme à Home Assistant depuis ma migration vers celui-ci.

Après pas mal de recherches j’ai opté pour node-red pour gérer cela.

J’ai pu récupérer des infos par ci par la afin d’établir mon flow qui est toujours en cours d’amélioration mais je voulais déjà vous partager le fruit de mes recherches…
J’ai eu un partage de flow de @jybi89 et @JeromeB que je remercie au passage et qui reconnaitront leur flow :wink:

Le principe de base est d’utilisé l’alarm panel dispo sur ha puisqu’il fait bien le taff autant en profiter :slight_smile:

Je fais donc un check sur le statut de celui-ci pour agir en fonction…

Le subflow déclencheurs devrait pouvoir être automatiser par la suite aussi , actuellement il check le capteur :

La vérification par telegram n’est pas encore en place mais cela ne va pas tarder…

Ensuite on passe à la partie déclenchement :

Bruit faible quand on rentre pour rappeller de couper l’alarme, si pas de réaction dans les 50 sec → activation de celle-ci.

Activation par tag Rfid + GPS (via l’appli ha et person) ET check des capteurs :


Voici le code pour le check de capteurs ( donc si vous oubliez une fenetre ou porte ouverte)

[{"id":"1114fad7.6e7de5","type":"ha-get-entities","z":"da9ae229.d4352","server":"1be4e017.1d13e","name":"Fenetres","rules":[{"property":"entity_id","logic":"is","value":"binary_sensor.fenetre","valueType":"re"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":240,"y":1100,"wires":[["5650b611.524ac8"]]},{"id":"9f5ea87a.995f28","type":"ha-get-entities","z":"da9ae229.d4352","server":"1be4e017.1d13e","name":"Portes","rules":[{"property":"entity_id","logic":"is","value":"binary_sensor.porte","valueType":"re"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":230,"y":1160,"wires":[["5650b611.524ac8"]]},{"id":"c15a7c9e.5f77e","type":"ha-get-entities","z":"da9ae229.d4352","server":"a922cae9.97be88","name":"Volets","rules":[{"property":"entity_id","logic":"is","value":"cover.porte","valueType":"re"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":230,"y":1040,"wires":[["5650b611.524ac8"]]},{"id":"5650b611.524ac8","type":"template","z":"da9ae229.d4352","name":"Format Friendly Name","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" {{{payload.attributes.friendly_name}}} est resté ouvert!","output":"str","x":480,"y":1100,"wires":[["c9a3b4bd.88c788"]]},{"id":"c9a3b4bd.88c788","type":"join","z":"da9ae229.d4352","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":", ","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":1100,"wires":[["1838ea17.224a46"]]},{"id":"1838ea17.224a46","type":"switch","z":"da9ae229.d4352","name":"Capteur On?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"No Results","vt":"str"},{"t":"neq","v":"No Results","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":1100,"wires":[["979a8c7a.056f6"],["6208420c.e0e91c","6cb21f97.1577a"]]},{"id":"e3557f44.05cf2","type":"link in","z":"da9ae229.d4352","name":"Check Capteurs out","links":["6d3f22a2.4fa37c"],"x":75,"y":1120,"wires":[["c15a7c9e.5f77e","1114fad7.6e7de5","9f5ea87a.995f28"]]},{"id":"1be4e017.1d13e","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"a922cae9.97be88","type":"server","z":"","name":"Home Assistant addon","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Les subflow Armed home - Armed Away et Disarmed serve a me notifier et exécuter des actions comme eteindre mes nextions, tablette, magic mirror etc

Je n’ai aucune prétention et je débute aussi comme beaucoup avec node-red donc n’hésitez pas je suis preneur de conseils et adaptations pour améliorer tout cela

A suivre donc !

super, ravi de voir que ca t’as servi :wink:

pour le check des capteurs, je n’ai pas besoin de le faire en ayant créé un group d’entité des capteurs, l’alarme ne se déclenchant uniquement sur un changement d’état, je peux ainsi laisser les fenetres ouvertent en oscilo battant :slight_smile:

waip merci :slight_smile: enfin je suis encore loin d’avoir terminé :slight_smile:

1 « J'aime »

Petit update avec la suite et le détail :

Coté Alarm Panel voici le flow :

[{"id":"eca76a48.700108","type":"subflow","name":"Sirène Faible","info":"","category":"","in":[{"x":40,"y":180,"wires":[{"id":"ffc90616.9f1bb8"},{"id":"c167448.97a1fb8"},{"id":"5f72a913.621208"}]}],"out":[{"x":700,"y":180,"wires":[{"id":"ffc90616.9f1bb8","port":0},{"id":"c167448.97a1fb8","port":0},{"id":"5f72a913.621208","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"ffc90616.9f1bb8","type":"api-call-service","z":"eca76a48.700108","name":"Sirene GW Salon: Faible","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"286c07891667\",\"ringtone_id\":4,\"ringtone_vol\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":350,"y":120,"wires":[[]]},{"id":"c167448.97a1fb8","type":"api-call-service","z":"eca76a48.700108","name":"Sirene GW garage : Faible","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"286C07F08F9D\",\"ringtone_id\":4,\"ringtone_vol\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":360,"y":180,"wires":[[]]},{"id":"5f72a913.621208","type":"api-call-service","z":"eca76a48.700108","name":"Sirene GW Ext: Faible","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"04cf8c913a93\",\"ringtone_id\":4,\"ringtone_vol\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":340,"y":240,"wires":[[]]},{"id":"d23c299.2ab8bd8","type":"subflow","name":"House disarmed (2)","info":"","category":"","in":[{"x":40,"y":180,"wires":[{"id":"3b483a9b.413a96"},{"id":"5c4a963c.ab9138"},{"id":"1fc82891.f82217"},{"id":"b2f9947c.b84c48"},{"id":"9304587e.335eb8"},{"id":"94d9949.ef98868"},{"id":"51f928d9.f45328"}]}],"out":[],"env":[],"color":"#DDAA99","status":{"x":260,"y":440,"wires":[{"id":"e4fb64d1.04fd28","port":0}]}},{"id":"3b483a9b.413a96","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Allumer awtrix salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.awtrix_salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":280,"y":20,"wires":[["ae222a76.a96018"]]},{"id":"79016075.5a69d","type":"cast-to-client","z":"d23c299.2ab8bd8","name":"","url":"","contentType":"","message":"","language":"fr","ip":"192.168.100.123","port":"","volume":"50","x":580,"y":80,"wires":[[]]},{"id":"5c4a963c.ab9138","type":"change","z":"d23c299.2ab8bd8","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Maison désarmée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":80,"wires":[["79016075.5a69d","25fee7a4.a406f8"]]},{"id":"ae222a76.a96018","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Nextion Salon On","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.nextion_salon_sw","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":20,"wires":[[]]},{"id":"9304587e.335eb8","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Media player OFF","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"media_player","service":"turn_off","entityId":"media_player.salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":270,"y":260,"wires":[[]]},{"id":"1fc82891.f82217","type":"api-call-service","z":"d23c299.2ab8bd8","name":"","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"stop_ringtone","entityId":"","data":"{\"gw_mac\":\"286c07891667\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":140,"wires":[[]]},{"id":"b2f9947c.b84c48","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Luminaire off","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.hue_color_spot_1, light.hue_color_spot_2, light.hue_color_spot_3","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":250,"y":200,"wires":[[]]},{"id":"94d9949.ef98868","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Notification HA Telephone","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_redmi_note_7","entityId":"","data":"{\"message\":\"Alarme désactivée\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":290,"y":320,"wires":[[]]},{"id":"51f928d9.f45328","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Lumiere GW Xiaomi","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.gateway_light_286c07f08f9d","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":280,"y":380,"wires":[[]]},{"id":"e4fb64d1.04fd28","type":"poll-state","z":"d23c299.2ab8bd8","name":"Alarm state","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":110,"y":440,"wires":[[]]},{"id":"25fee7a4.a406f8","type":"discord-send-messages","z":"d23c299.2ab8bd8","name":"","channel":"700026162738495498","token":"","x":560,"y":120,"wires":[]},{"id":"baaf1701.c507d8","type":"subflow","name":"Armed away (2)","info":"","category":"","in":[{"x":40,"y":20,"wires":[{"id":"3ea4d418.44f0dc"}]}],"out":[],"env":[],"status":{"x":220,"y":180,"wires":[{"id":"f6e4cd4d.2406d","port":0}]}},{"id":"3ea4d418.44f0dc","type":"api-current-state","z":"baaf1701.c507d8","name":"Armed away?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":180,"y":20,"wires":[["e568e19.f901c2"],[]]},{"id":"e568e19.f901c2","type":"api-call-service","z":"baaf1701.c507d8","name":"Eteindre awtrix salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.awtrix_salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":400,"y":20,"wires":[["284e1a10.390a66"]]},{"id":"284e1a10.390a66","type":"api-call-service","z":"baaf1701.c507d8","name":"Nextion Salon Off","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.nextion_salon_sw","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":20,"wires":[[]]},{"id":"f6e4cd4d.2406d","type":"poll-state","z":"baaf1701.c507d8","name":"Alarm state","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":90,"y":180,"wires":[[]]},{"id":"9180c7b7.4edf38","type":"subflow","name":"Armed Home (2)","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"70f20f44.46b5b"}]}],"out":[],"env":[],"status":{"x":220,"y":120,"wires":[{"id":"c196d4a8.5117a8","port":0}]}},{"id":"70f20f44.46b5b","type":"api-current-state","z":"9180c7b7.4edf38","name":"Armed Home?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":160,"y":40,"wires":[["7820cecf.e3efb"],[]]},{"id":"c196d4a8.5117a8","type":"server-state-changed","z":"9180c7b7.4edf38","name":"Alarm state","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","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":90,"y":120,"wires":[[]]},{"id":"7820cecf.e3efb","type":"api-call-service","z":"9180c7b7.4edf38","name":"Eteindre awtrix salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.awtrix_salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":440,"y":40,"wires":[[]]},{"id":"e06b6371.28d5","type":"server-state-changed","z":"cf169ee2.b0ec","name":"Home Alarm Mode","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":130,"y":120,"wires":[["b6fd0015.ab22a"]]},{"id":"b6fd0015.ab22a","type":"switch","z":"cf169ee2.b0ec","name":"Filter Alarm Status","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"armed_home","vt":"str"},{"t":"eq","v":"armed_away","vt":"str"},{"t":"eq","v":"disarmed","vt":"str"},{"t":"eq","v":"triggered","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":350,"y":120,"wires":[["5dd7e2a9.72ccec"],["d1901efe.8f20b"],["1e8de610.a9937a"],["46eb9568.7b364c"]]},{"id":"f377f37e.91ac3","type":"comment","z":"cf169ee2.b0ec","name":"Trigger automation________________________________","info":"","x":250,"y":200,"wires":[]},{"id":"5dd7e2a9.72ccec","type":"subflow:9180c7b7.4edf38","z":"cf169ee2.b0ec","name":"Armed Home","env":[],"x":610,"y":80,"wires":[]},{"id":"d1901efe.8f20b","type":"subflow:baaf1701.c507d8","z":"cf169ee2.b0ec","name":"Armed Away","env":[],"x":610,"y":140,"wires":[]},{"id":"6344a3de.a2ee8c","type":"subflow:d23c299.2ab8bd8","z":"cf169ee2.b0ec","name":"Disarmed","env":[],"x":820,"y":200,"wires":[]},{"id":"1e8de610.a9937a","type":"api-current-state","z":"cf169ee2.b0ec","name":"Disarmed?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610,"y":200,"wires":[["18395834.d5ca48","6344a3de.a2ee8c"],[]]},{"id":"46eb9568.7b364c","type":"api-current-state","z":"cf169ee2.b0ec","name":"Déclenchée?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"triggered","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610,"y":260,"wires":[["6f515d9e.37b6d4"],[]]},{"id":"6f515d9e.37b6d4","type":"subflow:eca76a48.700108","z":"cf169ee2.b0ec","name":"Sirène Faible","env":[],"x":830,"y":260,"wires":[["7a080f0a.debc4"]]},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Il permet de récupérer le statut du panel de ha et d’agir en fonction via le filter alarm status.
ce qui suit son les actions en fonction du statut.

pour ce qui est des déclencheurs j’ai fais un subflow et je les nomme pour la notification :

  [{"id":"f81ca3fb.f1a51","type":"subflow","name":"Déclencheurs -> triggered (2)","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"218a144b.63c82c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte tentrée","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_entree","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":80,"wires":[["17f16900.cdfab7"],[]]},{"id":"17f16900.cdfab7","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Porte Entrée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":80,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"401036ed.969288","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Volumétriques","info":"","x":190,"y":500,"wires":[]},{"id":"a3da8bc.af7ce78","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Absent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":620,"wires":[["d7e03054.79b12"],[]]},{"id":"50c765f6.ed3d7c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte terrasse G","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_terrase_g","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":140,"wires":[["b5ba2147.77fb8"],[]]},{"id":"b5ba2147.77fb8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Terrase G","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":140,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"efcf6215.74d9","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte terrasse S","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_terrase_s","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":200,"wires":[["4297d832.82d4e8"],[]]},{"id":"4297d832.82d4e8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Terrase S","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":200,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"469753d8.58e73c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur Fenetre Bureau","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.fenetre_bureau","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":320,"wires":[["a351974e.feebd8"],[]]},{"id":"a351974e.feebd8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Fenetre Bureau","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":320,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"154e71e1.fc40ee","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Périmétriques","info":"","x":190,"y":20,"wires":[]},{"id":"581303dc.c169ec","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur Fenetre Ch parents","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.fenetre_ch_parents","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":380,"wires":[["63c3ec5d.d9adc4"],[]]},{"id":"63c3ec5d.d9adc4","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Fenetre Ch parents","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":380,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"a3b25531.219c28","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur Fenetre Stelio","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.fenetre_ch_stelio","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":440,"wires":[["5e7ad33c.b799ac"],[]]},{"id":"5e7ad33c.b799ac","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Fenetre Stelio","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":440,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"d7e03054.79b12","type":"api-call-service","z":"f81ca3fb.f1a51","name":"Triggered","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_trigger","entityId":"alarm_control_panel.home_alarm","data":"{\"code\":\"3521\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1100,"y":500,"wires":[[]]},{"id":"2c66874c.cbdb28","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte Garage M","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_garage_maison","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":260,"wires":[["264a87bc.725048"],[]]},{"id":"264a87bc.725048","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Garage M","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":260,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"a3d08354.553cf","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres Ch Parents","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_ch_parents","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":560,"wires":[["e88a9eda.3927"],[]]},{"id":"e88a9eda.3927","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres_ch_parents","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":560,"wires":[["a3da8bc.af7ce78"]]},{"id":"4086f218.790d1c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres cuisine","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_cuisine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":620,"wires":[["ff7f82ae.e7f56"],[]]},{"id":"ff7f82ae.e7f56","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres cuisine","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":620,"wires":[["a3da8bc.af7ce78"]]},{"id":"54c531d7.23782","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres salon","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_salon","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":680,"wires":[["998e4864.cfcf58"],[]]},{"id":"998e4864.cfcf58","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres salon","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":680,"wires":[["a3da8bc.af7ce78"]]},{"id":"d0332a3b.2036e8","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres garage","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_terrasse","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":800,"wires":[["d9015521.9f25c8"],[]]},{"id":"d9015521.9f25c8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres garage","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":800,"wires":[["a3da8bc.af7ce78"]]},{"id":"50c69ab4.98fb64","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres atelier","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_atelier","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":860,"wires":[["75dcb3f8.c0947c"],[]]},{"id":"75dcb3f8.c0947c","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres atelier","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":860,"wires":[[]]},{"id":"4cca42d4.5427cc","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres SDB","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_sdb","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":740,"wires":[["7d3fc888.d50aa8"],[]]},{"id":"7d3fc888.d50aa8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte pres SDB","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":740,"wires":[["a3da8bc.af7ce78"]]},{"id":"31029802.bd12d8","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Présent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":800,"y":280,"wires":[["d7e03054.79b12"],[]]},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"6d06569.02320a8","type":"subflow:f81ca3fb.f1a51","z":"cf169ee2.b0ec","name":"Déclencheurs -> triggered","env":[],"x":150,"y":240,"wires":[]}]

ce qui donne un flow total :

[{"id":"33363a.18ecf9c6","type":"subflow","name":"Alarme","info":"","category":"","in":[{"x":60,"y":240,"wires":[{"id":"b86d1aee.209288"},{"id":"1343060c.3c7d9a"},{"id":"657ce97.a597618"},{"id":"f33ab1cc.69ad"},{"id":"507227ab.f92648"},{"id":"2e9f8855.2e0798"},{"id":"208fdb8b.032fb4"}]}],"out":[{"x":700,"y":240,"wires":[{"id":"1343060c.3c7d9a","port":0},{"id":"657ce97.a597618","port":0},{"id":"3dbbb3bc.472d3c","port":0},{"id":"507227ab.f92648","port":0},{"id":"b86d1aee.209288","port":0},{"id":"2e9f8855.2e0798","port":0},{"id":"208fdb8b.032fb4","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"657ce97.a597618","type":"api-call-service","z":"33363a.18ecf9c6","name":"Lumiere GW Xiaomi","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.gateway_light_286c07f08f9d","data":"{\"color_name\":\"red\",\"flash\":\"short\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":300,"y":80,"wires":[[]]},{"id":"1343060c.3c7d9a","type":"api-call-service","z":"33363a.18ecf9c6","name":"Luminaire Police2","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.hue_color_spot_1, light.hue_color_spot_2, light.hue_color_spot_3","data":"{\"effect\":\"Police2\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":290,"y":20,"wires":[[]]},{"id":"f33ab1cc.69ad","type":"api-call-service","z":"33363a.18ecf9c6","name":"Volume +","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.salon","data":"{\"volume_level\" : \"0.9\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":260,"y":140,"wires":[["3dbbb3bc.472d3c"]]},{"id":"3dbbb3bc.472d3c","type":"api-call-service","z":"33363a.18ecf9c6","name":"Message vocal","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.salon","data":"{\"language\":\"fr\",\"message\":\"Attention. Vous avez déclenché l'alarme, les photos et vidéos sont déjà envoyées à la police. Attention.\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":420,"y":140,"wires":[[]]},{"id":"b86d1aee.209288","type":"api-call-service","z":"33363a.18ecf9c6","name":"Sirene GW salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"ringtone_id\":\"2\",\"gw_mac\":\"286c07891667\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":290,"y":280,"wires":[[]]},{"id":"507227ab.f92648","type":"api-call-service","z":"33363a.18ecf9c6","name":"Notification HA Telephone","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_redmi_note_7","entityId":"","data":"{\"title\": \"Alerte !!!\" , \"message\" : \"Quelqu'un est entré chez vous !!!\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":200,"wires":[[]]},{"id":"2e9f8855.2e0798","type":"api-call-service","z":"33363a.18ecf9c6","name":"Sirene GW garage ","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"286C07F08F9D\",\"ringtone_id\":2,\"ringtone_vol\":100}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":290,"y":340,"wires":[[]]},{"id":"208fdb8b.032fb4","type":"api-call-service","z":"33363a.18ecf9c6","name":"Sirene GW Ext","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"04cf8c913a93\",\"ringtone_id\":2,\"ringtone_vol\":100}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":280,"y":400,"wires":[[]]},{"id":"eca76a48.700108","type":"subflow","name":"Sirène Faible","info":"","category":"","in":[{"x":40,"y":180,"wires":[{"id":"ffc90616.9f1bb8"},{"id":"c167448.97a1fb8"},{"id":"5f72a913.621208"}]}],"out":[{"x":700,"y":180,"wires":[{"id":"ffc90616.9f1bb8","port":0},{"id":"c167448.97a1fb8","port":0},{"id":"5f72a913.621208","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"ffc90616.9f1bb8","type":"api-call-service","z":"eca76a48.700108","name":"Sirene GW Salon: Faible","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"286c07891667\",\"ringtone_id\":4,\"ringtone_vol\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":350,"y":120,"wires":[[]]},{"id":"c167448.97a1fb8","type":"api-call-service","z":"eca76a48.700108","name":"Sirene GW garage : Faible","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"286C07F08F9D\",\"ringtone_id\":4,\"ringtone_vol\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":360,"y":180,"wires":[[]]},{"id":"5f72a913.621208","type":"api-call-service","z":"eca76a48.700108","name":"Sirene GW Ext: Faible","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"play_ringtone","entityId":"","data":"{\"gw_mac\":\"04cf8c913a93\",\"ringtone_id\":4,\"ringtone_vol\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":340,"y":240,"wires":[[]]},{"id":"f81ca3fb.f1a51","type":"subflow","name":"Déclencheurs -> triggered (2)","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"218a144b.63c82c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte tentrée","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_entree","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":80,"wires":[["17f16900.cdfab7"],[]]},{"id":"17f16900.cdfab7","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Porte Entrée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":80,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"401036ed.969288","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Volumétriques","info":"","x":190,"y":500,"wires":[]},{"id":"a3da8bc.af7ce78","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Absent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":620,"wires":[["d7e03054.79b12"],[]]},{"id":"50c765f6.ed3d7c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte terrasse G","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_terrase_g","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":140,"wires":[["b5ba2147.77fb8"],[]]},{"id":"b5ba2147.77fb8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Terrase G","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":140,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"efcf6215.74d9","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte terrasse S","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_terrase_s","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":200,"wires":[["4297d832.82d4e8"],[]]},{"id":"4297d832.82d4e8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Terrase S","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":200,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"469753d8.58e73c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur Fenetre Bureau","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.fenetre_bureau","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":320,"wires":[["a351974e.feebd8"],[]]},{"id":"a351974e.feebd8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Fenetre Bureau","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":320,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"154e71e1.fc40ee","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Périmétriques","info":"","x":190,"y":20,"wires":[]},{"id":"581303dc.c169ec","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur Fenetre Ch parents","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.fenetre_ch_parents","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":380,"wires":[["63c3ec5d.d9adc4"],[]]},{"id":"63c3ec5d.d9adc4","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Fenetre Ch parents","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":380,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"a3b25531.219c28","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur Fenetre Stelio","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.fenetre_ch_stelio","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":440,"wires":[["5e7ad33c.b799ac"],[]]},{"id":"5e7ad33c.b799ac","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Fenetre Stelio","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":440,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"d7e03054.79b12","type":"api-call-service","z":"f81ca3fb.f1a51","name":"Triggered","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_trigger","entityId":"alarm_control_panel.home_alarm","data":"{\"code\":\"3521\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1100,"y":500,"wires":[[]]},{"id":"2c66874c.cbdb28","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte Garage M","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_garage_maison","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":260,"wires":[["264a87bc.725048"],[]]},{"id":"264a87bc.725048","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Garage M","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":260,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"a3d08354.553cf","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres Ch Parents","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_ch_parents","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":560,"wires":[["e88a9eda.3927"],[]]},{"id":"e88a9eda.3927","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres_ch_parents","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":560,"wires":[["a3da8bc.af7ce78"]]},{"id":"4086f218.790d1c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres cuisine","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_cuisine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":620,"wires":[["ff7f82ae.e7f56"],[]]},{"id":"ff7f82ae.e7f56","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres cuisine","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":620,"wires":[["a3da8bc.af7ce78"]]},{"id":"54c531d7.23782","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres salon","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_salon","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":680,"wires":[["998e4864.cfcf58"],[]]},{"id":"998e4864.cfcf58","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres salon","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":680,"wires":[["a3da8bc.af7ce78"]]},{"id":"d0332a3b.2036e8","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres garage","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_terrasse","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":800,"wires":[["d9015521.9f25c8"],[]]},{"id":"d9015521.9f25c8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres garage","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":800,"wires":[["a3da8bc.af7ce78"]]},{"id":"50c69ab4.98fb64","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres atelier","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_atelier","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":860,"wires":[["75dcb3f8.c0947c"],[]]},{"id":"75dcb3f8.c0947c","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres atelier","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":860,"wires":[[]]},{"id":"4cca42d4.5427cc","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres SDB","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_sdb","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":740,"wires":[["7d3fc888.d50aa8"],[]]},{"id":"7d3fc888.d50aa8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte pres SDB","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":740,"wires":[["a3da8bc.af7ce78"]]},{"id":"31029802.bd12d8","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Présent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":800,"y":280,"wires":[["d7e03054.79b12"],[]]},{"id":"d23c299.2ab8bd8","type":"subflow","name":"House disarmed (2)","info":"","category":"","in":[{"x":40,"y":180,"wires":[{"id":"3b483a9b.413a96"},{"id":"5c4a963c.ab9138"},{"id":"1fc82891.f82217"},{"id":"b2f9947c.b84c48"},{"id":"9304587e.335eb8"},{"id":"94d9949.ef98868"},{"id":"51f928d9.f45328"}]}],"out":[],"env":[],"color":"#DDAA99","status":{"x":260,"y":440,"wires":[{"id":"e4fb64d1.04fd28","port":0}]}},{"id":"3b483a9b.413a96","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Allumer awtrix salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.awtrix_salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":280,"y":20,"wires":[["ae222a76.a96018"]]},{"id":"79016075.5a69d","type":"cast-to-client","z":"d23c299.2ab8bd8","name":"","url":"","contentType":"","message":"","language":"fr","ip":"192.168.100.123","port":"","volume":"50","x":580,"y":80,"wires":[[]]},{"id":"5c4a963c.ab9138","type":"change","z":"d23c299.2ab8bd8","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Maison désarmée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":80,"wires":[["79016075.5a69d","25fee7a4.a406f8"]]},{"id":"ae222a76.a96018","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Nextion Salon On","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.nextion_salon_sw","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":20,"wires":[[]]},{"id":"9304587e.335eb8","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Media player OFF","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"media_player","service":"turn_off","entityId":"media_player.salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":270,"y":260,"wires":[[]]},{"id":"1fc82891.f82217","type":"api-call-service","z":"d23c299.2ab8bd8","name":"","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"xiaomi_aqara","service":"stop_ringtone","entityId":"","data":"{\"gw_mac\":\"286c07891667\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":140,"wires":[[]]},{"id":"b2f9947c.b84c48","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Luminaire off","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.hue_color_spot_1, light.hue_color_spot_2, light.hue_color_spot_3","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":250,"y":200,"wires":[[]]},{"id":"94d9949.ef98868","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Notification HA Telephone","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_redmi_note_7","entityId":"","data":"{\"message\":\"Alarme désactivée\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":290,"y":320,"wires":[[]]},{"id":"51f928d9.f45328","type":"api-call-service","z":"d23c299.2ab8bd8","name":"Lumiere GW Xiaomi","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.gateway_light_286c07f08f9d","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":280,"y":380,"wires":[[]]},{"id":"e4fb64d1.04fd28","type":"poll-state","z":"d23c299.2ab8bd8","name":"Alarm state","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":110,"y":440,"wires":[[]]},{"id":"25fee7a4.a406f8","type":"discord-send-messages","z":"d23c299.2ab8bd8","name":"","channel":"700026162738495498","token":"","x":560,"y":120,"wires":[]},{"id":"baaf1701.c507d8","type":"subflow","name":"Armed away (2)","info":"","category":"","in":[{"x":40,"y":20,"wires":[{"id":"3ea4d418.44f0dc"}]}],"out":[],"env":[],"status":{"x":220,"y":180,"wires":[{"id":"f6e4cd4d.2406d","port":0}]}},{"id":"3ea4d418.44f0dc","type":"api-current-state","z":"baaf1701.c507d8","name":"Armed away?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":180,"y":20,"wires":[["e568e19.f901c2"],[]]},{"id":"e568e19.f901c2","type":"api-call-service","z":"baaf1701.c507d8","name":"Eteindre awtrix salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.awtrix_salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":400,"y":20,"wires":[["284e1a10.390a66"]]},{"id":"284e1a10.390a66","type":"api-call-service","z":"baaf1701.c507d8","name":"Nextion Salon Off","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.nextion_salon_sw","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":20,"wires":[[]]},{"id":"f6e4cd4d.2406d","type":"poll-state","z":"baaf1701.c507d8","name":"Alarm state","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":90,"y":180,"wires":[[]]},{"id":"9180c7b7.4edf38","type":"subflow","name":"Armed Home (2)","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"70f20f44.46b5b"}]}],"out":[],"env":[],"status":{"x":220,"y":120,"wires":[{"id":"c196d4a8.5117a8","port":0}]}},{"id":"70f20f44.46b5b","type":"api-current-state","z":"9180c7b7.4edf38","name":"Armed Home?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":160,"y":40,"wires":[["7820cecf.e3efb"],[]]},{"id":"c196d4a8.5117a8","type":"server-state-changed","z":"9180c7b7.4edf38","name":"Alarm state","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","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":90,"y":120,"wires":[[]]},{"id":"7820cecf.e3efb","type":"api-call-service","z":"9180c7b7.4edf38","name":"Eteindre awtrix salon","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.awtrix_salon","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":440,"y":40,"wires":[[]]},{"id":"e06b6371.28d5","type":"server-state-changed","z":"cf169ee2.b0ec","name":"Home Alarm Mode","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":130,"y":120,"wires":[["b6fd0015.ab22a"]]},{"id":"b6fd0015.ab22a","type":"switch","z":"cf169ee2.b0ec","name":"Filter Alarm Status","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"armed_home","vt":"str"},{"t":"eq","v":"armed_away","vt":"str"},{"t":"eq","v":"disarmed","vt":"str"},{"t":"eq","v":"triggered","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":350,"y":120,"wires":[["5dd7e2a9.72ccec"],["d1901efe.8f20b"],["1e8de610.a9937a"],["46eb9568.7b364c"]]},{"id":"f377f37e.91ac3","type":"comment","z":"cf169ee2.b0ec","name":"Trigger automation________________________________","info":"","x":250,"y":200,"wires":[]},{"id":"5dd7e2a9.72ccec","type":"subflow:9180c7b7.4edf38","z":"cf169ee2.b0ec","name":"Armed Home","env":[],"x":610,"y":80,"wires":[]},{"id":"d1901efe.8f20b","type":"subflow:baaf1701.c507d8","z":"cf169ee2.b0ec","name":"Armed Away","env":[],"x":610,"y":140,"wires":[]},{"id":"6344a3de.a2ee8c","type":"subflow:d23c299.2ab8bd8","z":"cf169ee2.b0ec","name":"Disarmed","env":[],"x":820,"y":200,"wires":[]},{"id":"6d06569.02320a8","type":"subflow:f81ca3fb.f1a51","z":"cf169ee2.b0ec","name":"Déclencheurs -> triggered","env":[],"x":150,"y":240,"wires":[]},{"id":"1e8de610.a9937a","type":"api-current-state","z":"cf169ee2.b0ec","name":"Disarmed?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610,"y":200,"wires":[["18395834.d5ca48","6344a3de.a2ee8c"],[]]},{"id":"7a080f0a.debc4","type":"stoptimer","z":"cf169ee2.b0ec","duration":"50","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":630,"y":420,"wires":[["296ac1cc.ae75ee","9c6fa831.7e81a8"],[]]},{"id":"18395834.d5ca48","type":"template","z":"cf169ee2.b0ec","name":"STOP","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"STOP","x":390,"y":420,"wires":[["7a080f0a.debc4","ed33a71e.184ec8"]]},{"id":"ed33a71e.184ec8","type":"stoptimer","z":"cf169ee2.b0ec","duration":"8","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":620,"y":540,"wires":[["296ac1cc.ae75ee"],[]]},{"id":"46eb9568.7b364c","type":"api-current-state","z":"cf169ee2.b0ec","name":"Déclenchée?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"triggered","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610,"y":260,"wires":[["6f515d9e.37b6d4"],[]]},{"id":"6f515d9e.37b6d4","type":"subflow:eca76a48.700108","z":"cf169ee2.b0ec","name":"Sirène Faible","env":[],"x":830,"y":260,"wires":[["7a080f0a.debc4"]]},{"id":"296ac1cc.ae75ee","type":"subflow:33363a.18ecf9c6","z":"cf169ee2.b0ec","name":"Alarme","env":[],"x":840,"y":480,"wires":[["ed33a71e.184ec8"]]},{"id":"9c6fa831.7e81a8","type":"template","z":"cf169ee2.b0ec","name":"Message intrusion","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Alarme declenchée par : {{global.declencheur}}","x":870,"y":420,"wires":[["f7661f7f.81421"]]},{"id":"cab76bed.ffac88","type":"inject","z":"cf169ee2.b0ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":630,"y":480,"wires":[["9c6fa831.7e81a8"]]},{"id":"40fcc650.1a6db8","type":"comment","z":"cf169ee2.b0ec","name":"Alarm Panel_______________________________","info":"","x":230,"y":40,"wires":[]},{"id":"f7661f7f.81421","type":"link out","z":"cf169ee2.b0ec","name":"Linkout Notif","links":["13fcae33.fde912","cfd0e0e6.ac8fa"],"x":1090,"y":420,"wires":[],"l":true},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

avec un autre subflow alarme pour déclencher les actions du triggered

Petit bonus pour la gestion de présence :

[{"id":"bf753649.d43b08","type":"switch","z":"cf169ee2.b0ec","name":"A la maison?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"home","vt":"str"},{"t":"eq","v":"not_home","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":370,"y":1360,"wires":[["1d94c98c.f9c126","36f519ff.6e7d66","c6e6c104.61af4"],["4d853093.9a331","fcde7a19.9ed738"]]},{"id":"1d94c98c.f9c126","type":"api-current-state","z":"cf169ee2.b0ec","name":"Statut?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":" Vient de partir","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.{{topic}}","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":480,"y":1300,"wires":[["c3c4eb2.134cf18"],["b1207716.8081d8"]]},{"id":"492769d8.446758","type":"api-call-service","z":"cf169ee2.b0ec","name":"Vient de partir","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.{{topic}}\",\"option\":\"Vient de partir\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":660,"y":1420,"wires":[["36f519ff.6e7d66"]]},{"id":"c3c4eb2.134cf18","type":"api-call-service","z":"cf169ee2.b0ec","name":" Vient d'arriver","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.{{topic}}\",\"option\":\"Vient d'arriver\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":660,"y":1280,"wires":[["fcde7a19.9ed738"]]},{"id":"bba075fd.bb3fa8","type":"api-call-service","z":"cf169ee2.b0ec","name":"Absent","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.{{topic}}\",\"option\":\"Absent\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":1400,"wires":[["c6e6c104.61af4"]]},{"id":"36f519ff.6e7d66","type":"trigger","z":"cf169ee2.b0ec","name":"10min","op1":"","op2":"{\"payload\":{\"data\":{\"option\":\"\"}}}","op1type":"nul","op2type":"json","duration":"10","extend":false,"units":"min","reset":"home","bytopic":"topic","outputs":1,"x":790,"y":1380,"wires":[["bba075fd.bb3fa8"]]},{"id":"c6e6c104.61af4","type":"trigger","z":"cf169ee2.b0ec","name":"24hr","op1":"","op2":"{\"payload\":{\"data\":{\"option\":\"\"}}}","op1type":"nul","op2type":"json","duration":"24","extend":false,"units":"hr","reset":"home","bytopic":"topic","topic":"topic","outputs":1,"x":1030,"y":1380,"wires":[["7207b18b.c59a9"]]},{"id":"fcde7a19.9ed738","type":"trigger","z":"cf169ee2.b0ec","name":"10min","op1":"","op2":"{\"payload\":{\"data\":{\"option\":\"\"}}}","op1type":"nul","op2type":"json","duration":"10","extend":false,"units":"min","reset":"not_home","bytopic":"topic","topic":"topic","outputs":1,"x":770,"y":1340,"wires":[["b1207716.8081d8"]]},{"id":"b1207716.8081d8","type":"api-call-service","z":"cf169ee2.b0ec","name":"Présent","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.{{topic}}\",\"option\":\"Présent\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":920,"y":1340,"wires":[[]]},{"id":"b5d699f0.9b8db8","type":"trigger-state","z":"cf169ee2.b0ec","name":"Personnes","server":"31e2ebaf.83d604","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"^person\\..*$","entityidfiltertype":"regex","debugenabled":false,"constraints":[{"id":"ntik6826mzb","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is_not","comparatorValueDatatype":"prevEntity","comparatorValue":"state"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":110,"y":1360,"wires":[["97abb910.5e6a18"],[]]},{"id":"4d853093.9a331","type":"api-current-state","z":"cf169ee2.b0ec","name":"Statut?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":" Vient de partir,Absent, Absent longue durée","halt_if_type":"str","halt_if_compare":"does_not_include","override_topic":false,"entity_id":"input_select.{{topic}}","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":480,"y":1420,"wires":[["492769d8.446758"],[]]},{"id":"5dd58b4b.aee694","type":"rbe","z":"cf169ee2.b0ec","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":265,"y":1360,"wires":[["bf753649.d43b08"]],"l":false},{"id":"97abb910.5e6a18","type":"change","z":"cf169ee2.b0ec","name":"Change","rules":[{"t":"change","p":"topic","pt":"msg","from":"person.","fromt":"str","to":"","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload = \"home\" ? \"home\" : \"not_home\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":215,"y":1360,"wires":[["5dd58b4b.aee694"]],"l":false},{"id":"c0f0aa89.3c5208","type":"comment","z":"cf169ee2.b0ec","name":"Présence______________________________________________________","info":"","x":290,"y":1240,"wires":[]},{"id":"7207b18b.c59a9","type":"api-call-service","z":"cf169ee2.b0ec","name":"Absent longue durée","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.{{topic}}\",\"option\":\"Absent longue durée\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1080,"y":1280,"wires":[[]]},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Et pour armer le tout sur détection de présence :

[{"id":"c89dcdae.600ba","type":"api-call-service","z":"cf169ee2.b0ec","name":"armer","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_arm_away","entityId":"alarm_control_panel.home_alarm","data":"{\"code\":\"3521\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":860,"wires":[["4874d7e1.029448"]]},{"id":"db6f723.4623c9","type":"server-state-changed","z":"cf169ee2.b0ec","name":"Person jona","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.jona","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":780,"wires":[["b5064325.25329"],["c49d3f0f.820cc"]]},{"id":"5a437473.1017ec","type":"api-call-service","z":"cf169ee2.b0ec","name":" GW Gar red","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.gateway_light_286c07f08f9d","data":"{\"color_name\":\"red\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":810,"y":860,"wires":[["c89dcdae.600ba"]]},{"id":"4874d7e1.029448","type":"stoptimer","z":"cf169ee2.b0ec","duration":"30","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":1050,"y":920,"wires":[["e2127b15.dae4f8"],[]]},{"id":"3bf7e923.e629f6","type":"change","z":"cf169ee2.b0ec","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Alarme activée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1120,"wires":[["4b434524.59a72c"]]},{"id":"4f4e86b5.417f98","type":"api-call-service","z":"cf169ee2.b0ec","name":"desarmer sur présence","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_disarm","entityId":"alarm_control_panel.home_alarm","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":610,"y":800,"wires":[["8e689803.575648"]]},{"id":"8e689803.575648","type":"change","z":"cf169ee2.b0ec","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Maison désarmée sur détection de présence","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":800,"wires":[["4b434524.59a72c"]]},{"id":"a903d4d0.a251c8","type":"server-state-changed","z":"cf169ee2.b0ec","name":"Person Aliki","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"person.aliki","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":840,"wires":[["b5064325.25329"],["a7c52f6c.0d5a5"]]},{"id":"b5064325.25329","type":"api-current-state","z":"cf169ee2.b0ec","name":"Armed away?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":800,"wires":[["4f4e86b5.417f98"],[]]},{"id":"a7c52f6c.0d5a5","type":"api-current-state","z":"cf169ee2.b0ec","name":"Check Jona pour armer","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"person.jona","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":370,"y":920,"wires":[[],["36f5e2ac.2490be"]]},{"id":"c49d3f0f.820cc","type":"api-current-state","z":"cf169ee2.b0ec","name":"Check Aliki pour armer","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"person.aliki","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":360,"y":860,"wires":[[],["36f5e2ac.2490be"]]},{"id":"36f5e2ac.2490be","type":"api-current-state","z":"cf169ee2.b0ec","name":"Armed away?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":880,"wires":[[],["5a437473.1017ec","47a9e5.5dd3461c"]]},{"id":"47a9e5.5dd3461c","type":"change","z":"cf169ee2.b0ec","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Maison armée personne ne semble présent dans la maison","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":940,"wires":[["4b434524.59a72c"]]},{"id":"71ffee8f.297d4","type":"link in","z":"cf169ee2.b0ec","name":"Check Capteurs out","links":["ec3fdb3b.230948","6dd4d67f.53f7e8","3f14177a.6d64a8"],"x":55,"y":1060,"wires":[["6ef4c0ab.27f4"]]},{"id":"497b81aa.2e7a","type":"comment","z":"cf169ee2.b0ec","name":"Check Capteurs resté ouvert","info":"","x":160,"y":1000,"wires":[]},{"id":"9ba6419d.02edf","type":"template","z":"cf169ee2.b0ec","name":"Création Msg","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" {{{payload.attributes.friendly_name}}} semble ouverte merci de vérifier son état","output":"str","x":410,"y":1000,"wires":[["41371ce0.6d7d64"]]},{"id":"41371ce0.6d7d64","type":"join","z":"cf169ee2.b0ec","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":", ","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":790,"y":1000,"wires":[["4b434524.59a72c"]]},{"id":"4b434524.59a72c","type":"link out","z":"cf169ee2.b0ec","name":"Linkout Notif","links":["13fcae33.fde912","cfd0e0e6.ac8fa"],"x":990,"y":1120,"wires":[],"l":true},{"id":"6ef4c0ab.27f4","type":"api-current-state","z":"cf169ee2.b0ec","name":"Etat périmétrique","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"group.doors","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":190,"y":1060,"wires":[["eba856b.70f2ba8"],["74fc03b5.fd9e9c"]]},{"id":"eba856b.70f2ba8","type":"ha-get-entities","z":"cf169ee2.b0ec","server":"31e2ebaf.83d604","name":"Portes/Fenetres ouvertes?","rules":[{"property":"attributes.device_class","logic":"is","value":"opening","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":460,"y":1060,"wires":[["9ba6419d.02edf"]]},{"id":"74fc03b5.fd9e9c","type":"api-current-state","z":"cf169ee2.b0ec","name":"Mode nuit ?","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.mode_nuit","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":1120,"wires":[["bf69ffd5.26a36","78ec9672.0843e8"],["3bf7e923.e629f6","5a437473.1017ec"]]},{"id":"78ec9672.0843e8","type":"api-call-service","z":"cf169ee2.b0ec","name":"armer nuit","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_arm_home","entityId":"alarm_control_panel.home_alarm","data":"{\"code\":\"3521\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":1180,"wires":[[]]},{"id":"bf69ffd5.26a36","type":"change","z":"cf169ee2.b0ec","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Alarme activée en mode nuit","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1180,"wires":[["4b434524.59a72c"]]},{"id":"e2127b15.dae4f8","type":"api-call-service","z":"cf169ee2.b0ec","name":" GW Gar off","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.gateway_light_286c07f08f9d","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1110,"y":980,"wires":[[]]},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

N’hésitez pas si vous avez des questions ou si vous voulez l’améliorer c’est bien entendu perfectible!

Il est sans cesse en train d’évolué aussi de mon coté

du coup tu m’as envie de paufiner mon flow @DcJona,

je cherche, dans ma notif telegram ou autre peut importe, à ne pas juste avoir un message d’alerte d’intrusion et que l’alarme est déclenchée; je souhaiterais donc inclure dans ma notification de quelle fenêtre ou porte il s’agit par exemple dans la data : {"message":"L'effraction à lieu sur {{states('binary_sensor.openclose_7')}}"}
mais voici le resultat :
image

j’imagine qu’il ne pas s’agir d’un « states », mais je ne sais pas quoi mettre à la place pour avoir le friendly name (et non binary_sensors.blablablabla).

tu as une idea?

j’ai essayé avec :

{"message":"L'effraction a lieu sur {{states('binary_sensor.openclose_7')}}"}

{"message":"L'effraction a lieu sur {{states('entity_id')}}"}

{"message":"L'effraction a lieu sur {{friendly_name('entity_id')}}"}

{"message":"L'effraction a lieu sur {{alias('entity_id')}}"}

image|689x203

Regarde au niveau du subflow : déclencheur. Il donne le device qui activé l’alarme et la notif en fonction

c’est assez complexe quand meme surtout quand on part de quelque chose déjà créé :slight_smile: , il n’y a pas moyen de passer le nom du friendly name au lieu de sont état dans un notify comme dans mon exemple? non pas ramener l’état avec le state(‹ nom de l’entité ›) avec juste son nom ?

Non peut dans doute passé différemment je vais regarder si j’qrriver à modifier le flow pour avoir le même résultat que l’actuel

@jybi89 as tu vu ce subflow ?

[{"id":"218a144b.63c82c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte tentrée","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_entree","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":80,"wires":[["17f16900.cdfab7"],[]]},{"id":"17f16900.cdfab7","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur Porte Entrée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":80,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"50c765f6.ed3d7c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur porte terrasse G","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porte_terrase_g","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":140,"wires":[["b5ba2147.77fb8"],[]]},{"id":"b5ba2147.77fb8","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur porte Terrase G","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":140,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"154e71e1.fc40ee","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Périmétriques","info":"","x":190,"y":20,"wires":[]},{"id":"a3d08354.553cf","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres Ch Parents","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_ch_parents","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":560,"wires":[["e88a9eda.3927"],[]]},{"id":"4086f218.790d1c","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Capteur pres cuisine","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.pres_cuisine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":620,"wires":[["ff7f82ae.e7f56"],[]]},{"id":"ff7f82ae.e7f56","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres cuisine","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":620,"wires":[["a3da8bc.af7ce78"]]},{"id":"e88a9eda.3927","type":"change","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","rules":[{"t":"set","p":"declencheur","pt":"global","to":"Capteur pres_ch_parents","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":560,"wires":[["a3da8bc.af7ce78"]]},{"id":"401036ed.969288","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Volumétriques","info":"","x":190,"y":500,"wires":[]},{"id":"31029802.bd12d8","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Présent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":800,"y":280,"wires":[["d7e03054.79b12"],[]]},{"id":"d7e03054.79b12","type":"api-call-service","z":"f81ca3fb.f1a51","name":"Triggered","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_trigger","entityId":"alarm_control_panel.home_alarm","data":"{\"code\":\"3521\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1100,"y":500,"wires":[[]]},{"id":"a3da8bc.af7ce78","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Absent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":620,"wires":[["d7e03054.79b12"],[]]},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Il te permet de nommé les capteurs comme tu veux et donc le déclencheur sera nommé si activation de l’alarme, c’est le boulot de @JeromeB :slight_smile:

yes :wink: mais je ne comprends pas le fonctionnement du switch qu’il a mis en place et l’envois de la notif, je vais lui poser la question.

je viens de trouver un truc, mais c’est surmenet pas dans les regles de l’art :

resultat :
image

apres mon trigger de delenchement je change dans msg.topic :

je change le contenue du msg.payload par celui du msg.topic

et le msg.payload modifié par sur le nœud notify telegram:

et ca fonctionne bien comme ca ?

bah ouais, c’est un peu fait avec la bite et le couteau, j’y ai passer une partie de la nuit et ce matin j’ai essayé ca. ca fait le job, un joli message sur telegram, PB, …

mais il faudra que quelque me dise comment récupérer le nom d’un capteur ou son friendlyname dans un message, genre un truc comme ca : {"message":"L'effraction a lieu sur {{friendly_name('entity_id')}}"} pour ma connaissance perso ! ca simplifierai les choses; :slight_smile:

regarde ce que j’ai pour le check si mes capteurs sont ouverts

[{"id":"6ef4c0ab.27f4","type":"api-current-state","z":"cf169ee2.b0ec","name":"Etat périmétrique","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"group.doors","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":170,"y":780,"wires":[["eba856b.70f2ba8"],["74fc03b5.fd9e9c"]]},{"id":"eba856b.70f2ba8","type":"ha-get-entities","z":"cf169ee2.b0ec","server":"31e2ebaf.83d604","name":"Portes/Fenetres ouvertes?","rules":[{"property":"attributes.device_class","logic":"is","value":"opening","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":440,"y":780,"wires":[["9ba6419d.02edf"]]},{"id":"9ba6419d.02edf","type":"template","z":"cf169ee2.b0ec","name":"Création Msg","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" {{{payload.attributes.friendly_name}}} semble ouverte merci de vérifier son état","output":"str","x":390,"y":720,"wires":[["41371ce0.6d7d64"]]},{"id":"41371ce0.6d7d64","type":"join","z":"cf169ee2.b0ec","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":", ","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":770,"y":720,"wires":[["4b434524.59a72c","e1b68e1e.a174e"]]},{"id":"e1b68e1e.a174e","type":"debug","z":"cf169ee2.b0ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":970,"y":780,"wires":[]},{"id":"4b434524.59a72c","type":"link out","z":"cf169ee2.b0ec","name":"Linkout Notif","links":["13fcae33.fde912","cfd0e0e6.ac8fa"],"x":1030,"y":720,"wires":[],"l":true},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

d’abord je check si l’état du group des contacteurs de portes est a on

et pour récup le device qui est ouvert :

image

qui donne pour la fonction message :

 {{{payload.attributes.friendly_name}}} semble ouverte merci de vérifier son état

ensuite le node join pour joindre le message et je notifie ce qui donne :

image

tu devrais pouvoir faire pareil pour les déclencheurs :slight_smile:

yesssss :slight_smile: j’étais passé à coté alors :stuck_out_tongue:

Du coup si tu utilises n’hésites pas a partager cz pourrait alléger le flow actuel :wink:
Je vais aussi regarder quand j’aurais le temps pour éviter la répétition des nodes comme actuellement

Bon ben j’y ai un peu regardé et ca passe sans soucis …

je pense qu’on peut donc résumé ceci :

par ceci :

et ca donnera en info :

image

le flow :

[{"id":"401036ed.969288","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Volumétriques","info":"","x":190,"y":140,"wires":[]},{"id":"a3da8bc.af7ce78","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Absent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":860,"y":200,"wires":[["d7e03054.79b12"],[]]},{"id":"154e71e1.fc40ee","type":"comment","z":"f81ca3fb.f1a51","name":"Déclenchement par un capteur Périmétriques","info":"","x":190,"y":20,"wires":[]},{"id":"d7e03054.79b12","type":"api-call-service","z":"f81ca3fb.f1a51","name":"Triggered","server":"31e2ebaf.83d604","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_trigger","entityId":"alarm_control_panel.home_alarm","data":"{\"code\":\"3521\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1140,"y":140,"wires":[[]]},{"id":"31029802.bd12d8","type":"api-current-state","z":"f81ca3fb.f1a51","name":"Armée Présent","server":"31e2ebaf.83d604","version":1,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":860,"y":80,"wires":[["d7e03054.79b12"],[]]},{"id":"971798e.296ae68","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Périmétriques","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.doors","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":90,"y":80,"wires":[["6839e8fa.7c8678"],[]]},{"id":"526dd8b9.902808","type":"template","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{{payload.attributes.friendly_name}}} a déclénché l'alarme","output":"str","x":580,"y":80,"wires":[["31029802.bd12d8","a3da8bc.af7ce78"]]},{"id":"6839e8fa.7c8678","type":"ha-get-entities","z":"f81ca3fb.f1a51","server":"31e2ebaf.83d604","name":"Portes/Fenetres ouvertes?","rules":[{"property":"attributes.device_class","logic":"is","value":"opening","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":320,"y":80,"wires":[["526dd8b9.902808"]]},{"id":"435b5964.b6ead8","type":"server-state-changed","z":"f81ca3fb.f1a51","name":"Volumétriques","server":"31e2ebaf.83d604","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.doors_sensors","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":90,"y":200,"wires":[["a9f02338.cbe94"],[]]},{"id":"76918c12.5ea794","type":"template","z":"f81ca3fb.f1a51","name":"Nom du déclencheur","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{{payload.attributes.friendly_name}}} a déclénché l'alarme","output":"str","x":580,"y":200,"wires":[["a3da8bc.af7ce78"]]},{"id":"a9f02338.cbe94","type":"ha-get-entities","z":"f81ca3fb.f1a51","server":"31e2ebaf.83d604","name":"Présence détectées?","rules":[{"property":"attributes.device_class","logic":"is","value":"motion","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":300,"y":200,"wires":[["76918c12.5ea794"]]},{"id":"31e2ebaf.83d604","type":"server","z":"","name":"Home Assistant ip","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
1 « J'aime »