-
Notifications
You must be signed in to change notification settings - Fork 185
/
work.yaml
executable file
·58 lines (56 loc) · 1.46 KB
/
work.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
---
#-
# _
# __ _____ _ __| | __
# \ \ /\ / / _ \| '__| |/ /
# \ V V / (_) | | | <
# \_/\_/ \___/|_| |_|\_\
#
#
#- from github.com/basnijholt/home-assistant-config
- alias: "Work: go home notification"
trigger:
platform: state
entity_id: binary_sensor.worked_enough_today
from: "off"
to: "on"
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: "on"
- condition: state
entity_id: input_boolean.work_hour_notification_sent
state: "off"
action:
- service: notify.mobile_app_basnijholt_iphone
data:
title: "Work"
message: "You have worked 8 hours today, very good! Go home 🎉"
- service: input_boolean.turn_on
entity_id: input_boolean.work_hour_notification_sent
- alias: "Work: reset input_boolean at midnight"
trigger:
platform: time
at: "00:00"
condition:
condition: state
entity_id: input_boolean.work_hour_notification_sent
state: "on"
action:
service: input_boolean.turn_off
entity_id: input_boolean.work_hour_notification_sent
- alias: "Work: Bas left work notification for Marcella"
trigger:
platform: state
entity_id: person.bas
from: "Work"
condition:
condition: time
after: "15:00:00"
before: "22:00:00"
action:
# service: notify.mobile_app_marcella_iphone
service: notify.all_iphones
data:
title: "Work"
message: "Bas has left work! ♥️🎉"