Move welcome home to the occupancy package
This commit is contained in:
parent
1d6fbac45c
commit
05b9e214e8
|
@ -28,41 +28,3 @@
|
|||
from: not_home
|
||||
platform: state
|
||||
to: home
|
||||
- action:
|
||||
- delay: '00:00:05'
|
||||
- service: script.sonos_tts
|
||||
data_template:
|
||||
message: >-
|
||||
Welcome home,
|
||||
{{ states
|
||||
| selectattr("entity_id", "in",
|
||||
states.group.phones.attributes.entity_id)
|
||||
| selectattr('state', 'eq', 'home')
|
||||
| map(attribute='attributes.friendly_name')
|
||||
| join(' and ')}}!
|
||||
alias: Welcome home
|
||||
trigger:
|
||||
- entity_id: group.phones
|
||||
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
|
||||
|
|
|
@ -44,7 +44,23 @@ automation:
|
|||
- condition: state
|
||||
entity_id: binary_sensor.activity
|
||||
state: 'off'
|
||||
|
||||
- alias: Welcome home
|
||||
action:
|
||||
- delay: '00:00:05'
|
||||
- service: script.sonos_tts
|
||||
data_template:
|
||||
message: >-
|
||||
Welcome home,
|
||||
{{ states
|
||||
| selectattr("entity_id", "in",
|
||||
states.group.phones.attributes.entity_id)
|
||||
| selectattr('state', 'eq', 'home')
|
||||
| map(attribute='attributes.friendly_name')
|
||||
| join(' and ')}}!
|
||||
trigger:
|
||||
- entity_id: binary_sensor.occupied
|
||||
platform: state
|
||||
to: 'on'
|
||||
|
||||
input_boolean:
|
||||
occupied:
|
||||
|
@ -85,6 +101,7 @@ group:
|
|||
- automation.turn_off_lights_when_unoccupied
|
||||
- automation.set_occupied
|
||||
- automation.unset_occupied
|
||||
- automation.welcome_home
|
||||
occupancy_overrides:
|
||||
name: Overrides
|
||||
entities:
|
||||
|
|
Loading…
Reference in New Issue