From 8e6d06cef5cd1dc501de05f1b4b1c88db6cbecfb Mon Sep 17 00:00:00 2001 From: xPsIXx Date: Mon, 13 Feb 2017 14:54:16 +0400 Subject: [PATCH] Create automation_telegram_presence_alert (#1729) --- .../ \tautomation_telegram_presence_alert" | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 "source/_cookbook/ \tautomation_telegram_presence_alert" diff --git "a/source/_cookbook/ \tautomation_telegram_presence_alert" "b/source/_cookbook/ \tautomation_telegram_presence_alert" new file mode 100644 index 00000000000..c2c0ff42aa3 --- /dev/null +++ "b/source/_cookbook/ \tautomation_telegram_presence_alert" @@ -0,0 +1,27 @@ +This will send an alert when someone in your known devices list connects to the networt via wifi. In other words, when someone arrives home. +It will only work if you are using nmap or similar component. +I am using the ddwrt component to get a list of connected devices on my network. + +follow these isntructions to get api_key and chat_id +https://home-assistant.io/components/notify.telegram/ + +// Add the telegram component +notify: + - name: Telegram + platform: telegram + api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + chat_id: xxxxxxxxx + +//add the automation component +//Note: device_name_here should be whatever the device is named in known devices file. + +automation: + trigger: + platform: state + entity_id: device_tracker.device_name_here + from: 'not_home' + to: 'home' + action: + service: notify.Telegram + data: + message: "Person is now home"