mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Fix markdown
This commit is contained in:
parent
31d363c2c9
commit
62db81541b
@ -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.
|
layout: page
|
||||||
I am using the ddwrt component to get a list of connected devices on my network.
|
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
|
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.
|
||||||
https://home-assistant.io/components/notify.telegram/
|
|
||||||
|
|
||||||
// Add the telegram component
|
This example uses [/components/notify.telegram/](Telegram) to send the notification.
|
||||||
|
|
||||||
|
```yaml
|
||||||
notify:
|
notify:
|
||||||
- name: Telegram
|
- name: Telegram
|
||||||
platform: telegram
|
platform: telegram
|
||||||
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
chat_id: xxxxxxxxx
|
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:
|
automation:
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
platform: state
|
||||||
@ -24,4 +34,5 @@ automation:
|
|||||||
action:
|
action:
|
||||||
service: notify.Telegram
|
service: notify.Telegram
|
||||||
data:
|
data:
|
||||||
message: "Person is now home"
|
message: 'Person is now home'
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user