108 lines
2.4 KiB
YAML
108 lines
2.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.weather_report
|
|
alias: Morning weather
|
|
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
|
|
- action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.dimmed_brightness
|
|
alias: Dim when Plex is active
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.plex_ps4
|
|
to: playing
|
|
from: idle
|
|
condition:
|
|
- condition: state
|
|
entity_id: light.living_room
|
|
state: 'on'
|
|
- action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.nighttime_brightness
|
|
alias: Restore nighttime lights after Plex
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.plex_ps4
|
|
to: idle
|
|
from: playing
|
|
condition:
|
|
- condition: state
|
|
entity_id: light.living_room
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'below_horizon'
|
|
- action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.normal_brightness
|
|
alias: Restore normal lights after Plex
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.plex_ps4
|
|
to: idle
|
|
from: playing
|
|
condition:
|
|
- condition: state
|
|
entity_id: light.living_room
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'above_horizon'
|
|
|