-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
95 lines (87 loc) · 2.12 KB
/
automations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
######
# PORCH LIGHTS
######
- alias: Turn on Porch lights when movement after sunset
trigger:
platform: state
entity_id: binary_sensor.porch_camera_motion_detected
to: 'on'
condition:
condition: state
entity_id: sun.sun
state: below_horizon
action:
service: homeassistant.turn_on
entity_id: group.porch_lights
data:
transition: 1
- alias: Turn off porch lights 10 minutes after last movement
trigger:
platform: state
entity_id: binary_sensor.porch_camera_motion_detected
to: 'off'
for:
minutes: 10
action:
service: homeassistant.turn_off
entity_id: group.porch_lights
data:
# Avoid Nest detecting motion by using a slow change.
transition: 30
######
# FLASH PATIO LIGHTS ON PORCH MOVEMENT
######
- alias: Flash patio lights when porch movment detected
trigger:
platform: state
entity_id: binary_sensor.porch_camera_motion_detected
to: 'on'
action:
service: light.lifx_effect_pulse
data:
entity_id: group.patio_lights
color_name: red
brightness: 200
period: 0.5
cycles: 6
mode: breathe
######
# CINEMA DIMMING
######
- alias: Cinema room lighting scene when stopped playing a movie
trigger:
- platform: state
entity_id: media_player.cinema_kodi
from: 'playing'
to: 'idle'
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
service: scene.turn_on
entity_id: scene.cinema_normal
- alias: Cinema room lighting scene when playing a movie
trigger:
- platform: state
entity_id: media_player.cinema_kodi
to: 'playing'
from: 'idle'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: scene.turn_on
entity_id: scene.cinema_movie
######
# NEW HASS NOTIFICATION EMAIL
######
- alias: Update notifications
trigger:
- platform: state
entity_id: updater.updater
action:
service: notify.julian_edwards_com_email
data:
message: 'There is a new Home Assistant release available.'