forked from basnijholt/home-assistant-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vacation_mode.yaml
executable file
·42 lines (41 loc) · 1.1 KB
/
vacation_mode.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
---
- alias: "Vacation mode: auto turn on"
initial_state: "on"
trigger:
platform: state
entity_id: group.persons
from: home
to: not_home
for: "24:00:00"
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
action:
- service: input_boolean.turn_on
entity_id: input_boolean.vacation_mode
- service: notify.mobile_app_basnijholt_iphone
data:
title: "Vacation mode"
message: "No one at home for 24 hours, switching on vacation mode."
- alias: "Vacation mode: auto turn off"
initial_state: "on"
trigger:
platform: state
entity_id: group.persons
from: not_home
to: home
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: "on"
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.vacation_mode
- service: notify.mobile_app_basnijholt_iphone
data:
title: "Vacation mode"
message: "Welcome back! Switching off the vacation mode."