Notify when someone's home
This commit is contained in:
parent
2b1725b7ce
commit
fae0cd8c06
2 changed files with 25 additions and 0 deletions
|
@ -60,6 +60,26 @@
|
|||
platform: state
|
||||
from: not_home
|
||||
to: home
|
||||
- action:
|
||||
- service: notify.notifymyandroid
|
||||
data:
|
||||
message: >-
|
||||
Someone's home:
|
||||
{{ states
|
||||
| selectattr("entity_id", "in",
|
||||
states.group.phones.attributes.entity_id)
|
||||
| selectattr('state', 'eq', 'home')
|
||||
| map(attribute='attributes.friendly_name')
|
||||
| join(' and ')}}.
|
||||
alias: Notify that someone else is home
|
||||
trigger:
|
||||
- entity_id: group.phones
|
||||
platform: state
|
||||
to: home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: device_tracker.homeassistant_pixel
|
||||
state: not_home
|
||||
- action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.dimmed_brightness
|
||||
|
|
|
@ -84,6 +84,11 @@ weather:
|
|||
- platform: darksky
|
||||
api_key: !secret darksky_api_key
|
||||
|
||||
notify:
|
||||
- name: notifymyandroid
|
||||
platform: nma
|
||||
api_key: !secret notifymyandroid_api_key
|
||||
|
||||
zone: !include zones.yaml
|
||||
group: !include groups.yaml
|
||||
automation: !include automations.yaml
|
||||
|
|
Loading…
Reference in a new issue