Fix markdown

This commit is contained in:
Fabian Affolter 2017-02-13 12:17:20 +01:00
parent 31d363c2c9
commit 62db81541b
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -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'
```