home-assistant/automations.yaml

62 lines
1.4 KiB
YAML

- action:
- data:
group_name: Living room
scene_name: Bright
service: hue.hue_activate_scene
alias: Correl's Home
condition:
- after: sunset
before: sunrise
condition: sun
id: '1521648884156'
trigger:
- entity_id: device_tracker.homeassistant_pixel
event: enter
platform: zone
zone: zone.home
- action:
- data:
group_name: Living room
scene_name: Stephanie
service: hue.hue_activate_scene
alias: Stephanie's Home
condition: []
id: '1521649963712'
trigger:
- entity_id: device_tracker.stephaniesiphone
from: not_home
platform: state
to: home
- action:
- data: {}
service: script.good_morning
alias: Good morning
condition:
- after: '6:00'
before: '12:00'
condition: time
id: '1521686674842'
trigger:
- entity_id: light.living_room
from: 'off'
platform: state
to: 'on'
- 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