-
Notifications
You must be signed in to change notification settings - Fork 2
/
automations.yaml
95 lines (92 loc) · 2.84 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
- id: '1608610104075'
alias: HVAC - Heating Started
description: ''
trigger:
- platform: state
entity_id: climate.living_room
attribute: hvac_action
to: heating
from: 'off'
condition: []
action:
- service: logbook.log
data:
name: Nest Thermostat Heating
message: 'current: {{ state_attr("climate.living_room","current_temperature")
}}; target: {{ state_attr("climate.living_room","temperature") }}'
entity_id: climate.living_room
- service: input_datetime.set_datetime
entity_id: input_datetime.hvac_current_heat_started
data:
datetime: '{{ now().strftime("%Y-%m-%d %H:%M:%S") }}'
- service: input_number.set_value
data:
value: '{{ states("sensor.living_room_temperature")|float }}'
entity_id: input_number.hvac_current_heat_start_temp
mode: single
- id: '1608610167182'
alias: HVAC - Cooling Started
description: ''
trigger:
- platform: state
entity_id: climate.living_room
attribute: hvac_action
to: cooling
condition: []
action:
- service: logbook.log
data:
name: Nest Thermostat Cooling
message: 'current_temp: {{ state_attr("limate.living_room","current_temperature")
}}'
target_temp: '{{ state_attr("climate.living_room","temperature") }}'
entity_id: climate.living_room
mode: single
- id: '1609223478340'
alias: HVAC - Heating Ended
description: ''
trigger:
- platform: state
entity_id: climate.living_room
attribute: hvac_action
to: 'off'
from: heating
condition: []
action:
- service: logbook.log
data:
name: Nest Thermostat Heating Ended
message: 'current_temp: {{ state_attr("climate.living_room","current_temperature")
}}; target_temp: {{ state_attr("climate.living_room","temperature") }}'
entity_id: climate.living_room
- service: input_datetime.set_datetime
data:
datetime: '{{ states("input_datetime.hvac_current_heat_started") }}'
entity_id: input_datetime.hvac_heat_started
- service: input_datetime.set_datetime
data:
datetime: '{{ now().strftime("%Y-%m-%d %H:%M:%S") }}'
entity_id: input_datetime.hvac_heat_ended
- service: input_number.set_value
data:
value: '{{ states("input_number.hvac_current_heat_start_temp")|float }}'
entity_id: input_number.hvac_heat_start_temp
- service: input_number.set_value
data:
value: '{{ states("sensor.living_room_temperature")|float }}'
entity_id: input_number.hvac_heat_end_temp
mode: single
- id: '1611287263653'
alias: HVAC - Target Temp Changed
description: ''
trigger:
- platform: state
entity_id: climate.living_room
attribute: temperature
condition: []
action:
- service: input_number.set_value
data:
value: '{{ states("sensor.living_room_temperature")|float }}'
entity_id: input_number.hvac_heat_end_temp
mode: single