Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Notification when someone comes home or leaves

$
0
0

@war1000 wrote:

I am really hoping someone can help me with this as this seems to be pretty common. I am trying to setup a notification with presence. I have setup the presence through my asus router.

I have read several threads and still can’t seem to figure this out…can you guys please help me? Thanks in advance

- id: '1576450548715'
  alias: Presence Notification
  description: ''
  trigger:
  - entity_id: device_tracker.mo_huawei_phone
    platform: state
  - entity_id: device_tracker.tarin_huawei_phone
    platform: state
  condition: []
  action:
  - data:
     message: |
      {% if trigger.entity_id == "device_tracker.mo_huawei_phone" %}
       {% set person = "Mo" %}  
      {% elif trigger.entity_id == "device_tracker.tarin_huawei_phone" %}
       {% set person = "Tarin" %}                                     
      {% endif %} 
      {% if trigger.to_state.state == 'home' %}
       {{ person }} is home
      {% else %} 
       {{ person }} has left home
      {% endif %}
     title: 'Home info {{ states.sensor.time.state }}'
    service: notify.notify

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>