From 62db81541b77ecadb3e09bf2cb526a273bf0b6ff Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Feb 2017 12:17:20 +0100 Subject: [PATCH] Fix markdown --- ...utomation_telegram_presence_alert.markdown | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/source/_cookbook/automation_telegram_presence_alert.markdown b/source/_cookbook/automation_telegram_presence_alert.markdown index c2c0ff42aa3..634908943eb 100644 --- a/source/_cookbook/automation_telegram_presence_alert.markdown +++ b/source/_cookbook/automation_telegram_presence_alert.markdown @@ -1,20 +1,30 @@ -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. +--- +layout: page +title: "Examples sending notification depending of the presence" +description: "Examples sending notification depending of the presence" +date: 2017-02-12 19:05 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Automation Examples +--- -follow these isntructions to get api_key and chat_id -https://home-assistant.io/components/notify.telegram/ +This will send a message when someone in your known devices list connects to your local network. In other words, when someone arrives home. It will only work if you are using the [nmap](/components/device_tracker.nmap_tracker/) device tracker or a similar component. -// Add the telegram component +This example uses [/components/notify.telegram/](Telegram) to send the notification. + +```yaml 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. +``` +Add the automation rule. Change `device_name_here` to match the device you want to track. + +```yaml automation: trigger: platform: state @@ -24,4 +34,5 @@ automation: action: service: notify.Telegram data: - message: "Person is now home" + message: 'Person is now home' +```