-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
192 lines (192 loc) · 5.6 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
alias: A_WW_Aufbereitung
description: Warmwasseraufbereitung je nach PV-Strom
trigger:
- platform: numeric_state
entity_id: sensor.power_real_fronius_meter_0_192_168_1_16
for:
hours: 0
minutes: 4
seconds: 0
below: -2300
id: ausreichend_PVStrom
- platform: numeric_state
entity_id: sensor.power_real_fronius_meter_0_192_168_1_16
for:
hours: 0
minutes: 0
seconds: 10
above: 0
id: zu_wenig_PVStrom
- platform: numeric_state
entity_id: sensor.wt_dammerung_lx
for:
hours: 0
minutes: 1
seconds: 0
below: 20
id: Sonnenuntergang
- platform: template
value_template: >-
{{ (now().timestamp())|float >=
as_timestamp(states("sensor.power_highest_peak_time_today"))|float}}
id: highest_estimated_peak_time_erreicht
- platform: template
value_template: >-
{{states("sensor.komfort_speicher_soll_temperatur")|float >
states("sensor.speicher_ist_temperatur")|float+5}}
id: Komfortspeichertemperatur erhöht
- platform: numeric_state
entity_id: sensor.power_real_fronius_meter_0_192_168_1_16
below: -670
id: Heizkörperleistung frei
for:
hours: 0
minutes: 5
seconds: 0
- platform: time_pattern
minutes: "30"
id: tagsüber alle 30 Minuten
- platform: state
entity_id:
- switch.badheizkorper_1_og
from: "off"
to: "on"
for:
hours: 0
minutes: 5
seconds: 0
id: Badheizkörper 1 ist an
- platform: template
value_template: >-
{{states('sensor.power_real_fronius_meter_0_192_168_1_16')|int-states('sensor.badheizkorper_2_og_leistung_w')|default(0)|int-states('sensor.badheizkorper_wirkleistung_w')|int|default(0)<-2300}}
id: genugPV-Strom mit Heizung AUS
condition: []
action:
- if:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.komfort_speicher_soll_temperatur
below: 58
- condition: or
conditions:
- condition: trigger
id: ausreichend_PVStrom
- condition: trigger
id: genugPV-Strom mit Heizung AUS
then:
- service: input_text.set_value
data:
value: "{{states('sensor.komfort_speicher_soll_temperatur')|int*10+60}}"
target:
entity_id: input_text.ww_komfort_temp
- if:
- condition: trigger
id: genugPV-Strom mit Heizung AUS
then:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.badheizkorper_2_og
- switch.badheizkorper_1_og
else: []
- if:
- condition: trigger
id: highest_estimated_peak_time_erreicht
- condition: template
value_template: >
{{states("sensor.energy_production_today")|float >=
states("sensor.energy_production_tomorrow")|float*1.7}}
- condition: numeric_state
entity_id: sensor.komfort_speicher_soll_temperatur
below: 50
then:
- service: input_text.set_value
data:
value: "{{states('sensor.komfort_speicher_soll_temperatur')|int*10+100}}"
target:
entity_id: input_text.ww_komfort_temp
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.badheizkorper_1_og
- switch.badheizkorper_2_og
- delay:
hours: 0
minutes: 40
seconds: 0
milliseconds: 0
- if:
- condition: or
conditions:
- condition: trigger
id: Heizkörperleistung frei
- condition: trigger
id: Badheizkörper 1 ist an
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.badheizkorper_1_og
- if:
- condition: state
entity_id: switch.badheizkorper_1_og
state: "on"
for:
hours: 0
minutes: 0
seconds: 20
- condition: numeric_state
entity_id: sensor.power_real_fronius_meter_0_192_168_1_16
below: -670
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.badheizkorper_2_og
- if:
- condition: trigger
id: zu_wenig_PVStrom
then:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.badheizkorper_1_og
- switch.badheizkorper_2_og
- if:
- condition: template
value_template: >-
{{(states('sensor.speicher_ist_temperatur')|int*10<states('sensor.komfort_speicher_soll_temperatur')|int*10-20)
and states('sensor.komfort_speicher_soll_temperatur')|int*10>=380
and is_state("sun.sun", "above_horizon")}}
then:
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- if:
- condition: numeric_state
entity_id: sensor.power_real_fronius_meter_0_192_168_1_16
above: 0
then:
- service: input_text.set_value
data:
value: "{{states('sensor.speicher_ist_temperatur')|int*10}}"
target:
entity_id: input_text.ww_komfort_temp
- if:
- condition: trigger
id: Sonnenuntergang
then:
- service: input_text.set_value
data:
value: "380"
target:
entity_id: input_text.ww_komfort_temp
mode: queued
trace:
stored_traces: 100