-
Notifications
You must be signed in to change notification settings - Fork 1
/
automations.yaml
3782 lines (3782 loc) · 98.5 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
- id: '1575211081818'
alias: Büro Jens - Beleuchtung - Dunkelheit (Shaun an)
description: ''
trigger:
- entity_id: input_boolean.licht_innen_dunkelheit
from: 'off'
platform: state
to: 'on'
alias: Wenn es dunkel wird
- platform: state
entity_id:
- input_boolean.sonnenschutz_west
from: 'off'
to: 'on'
alias: Sonnenschutz West aktiviert
condition:
- condition: state
entity_id: switch.plug_office_jens_computer
state: 'on'
alias: Shaun ist an
action:
- service: light.turn_on
data:
brightness_pct: 80
rgb_color:
- 255
- 227
- 145
target:
entity_id: light.guestroom_standinglight
alias: Stehlampe an
mode: single
- id: '1575655704902'
alias: Präsenz - Ankommen - Eva komme nach Hause und Jens sitzt am Schreibtisch
description: ''
trigger:
- entity_id: person.eva
from: not_home
platform: state
to: home
alias: Eva kommt nach Hause
condition:
- condition: state
entity_id: person.jens
state: home
alias: Jens ist zu Hause
- condition: state
entity_id: switch.plug_office_jens_computer
state: 'on'
alias: Shaun ist an
action:
- service: script.turn_on
data: {}
target:
entity_id: script.office_jens_alarm_rainbow
alias: Regenbogen Alarm
- id: '1577789351489'
alias: Wecker - Wake up light
description: ''
trigger:
- platform: template
value_template: '{{ states(''sensor.time'') == states(''input_datetime.alarm_wake_up_light'')[0:5]
}}'
alias: Weckzeitpunkt erreicht
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
alias: Arbeitstag
- condition: state
entity_id: input_boolean.sleeping
state: 'on'
alias: Am Schlafen
- condition: state
entity_id: input_boolean.alarm_enabled
state: 'on'
alias: Wecker aktiviert
- condition: state
entity_id: input_boolean.hauswachtermodus
state: 'off'
alias: Hauswächtermodus aus
action:
- entity_id: script.wakeup_light
service: script.turn_on
- id: '1578663748318'
alias: HACS - Add notification when update available
description: ''
trigger:
- entity_id: sensor.hacs
platform: state
condition:
- condition: template
value_template: '{{ states(trigger.entity_id) != ''unknown''}}'
- condition: template
value_template: '{{ (states(trigger.entity_id) | float) != 0}}'
action:
- data_template:
message: "{% for repo in state_attr(trigger.entity_id, 'repositories') %}\n
\ **{{ repo.display_name }}** _{{ repo[\"installed_version\"] }}_ -> _{{ repo[\"available_version\"]
}}_\n{% endfor %}"
notification_id: hacs_update_notification
title: Updates pending in HACS
service: persistent_notification.create
- id: '1581182751392'
alias: Person - Eva - Stall verlassen
description: ''
trigger:
- entity_id: person.eva
event: leave
platform: zone
zone: zone.hof_holzapfel
alias: Eva verlaesst den Stall
condition:
- condition: state
entity_id: person.jens
state: home
alias: Jens ist zu Hause
- condition: state
entity_id: switch.plug_office_jens_computer
state: 'on'
alias: Shaun ist an
- condition: state
entity_id: input_boolean.hauswachtermodus
state: 'off'
alias: Hauswächtermodus aus
action:
- entity_id: script.office_jens_alarm_red
service: script.turn_on
alias: Roter Alarm
- id: '1588948500578'
alias: Wecker - Rolladen auf Spalt
description: ''
trigger:
- platform: template
value_template: '{{ states(''sensor.time'') == states(''input_datetime.alarm_open_shutters'')[0:5]
}}'
alias: Wenn Uhrzeit erreicht
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
alias: An Arbeitstagen
- condition: state
entity_id: input_boolean.sleeping
state: 'on'
alias: Wenn Schlafen aktiv ist
- condition: state
entity_id: input_boolean.alarm_enabled
state: 'on'
alias: Wenn der Wecker an ist
action:
- data: {}
service: script.turn_on
target:
entity_id:
- script.rollladen_schlafzimmer_spalt
alias: Rollladen auf Spalt
- id: '1589642700574'
alias: Schlafen - Lichtschutz
description: ''
trigger:
- event: sunrise
offset: -01:00:00
platform: sun
alias: Eine Stunde vor Sonnenaufgang
condition: []
action:
- service: cover.close_cover
data: {}
alias: Alle Rollläden schließen
target:
entity_id:
- cover.rollladen_buro_eva
- cover.rollladen_buro_jens
- cover.rollladen_wohnzimmer_couch
- cover.rollladen_wohnzimmer_esstisch
- cover.rollladen_wohnzimmer_terrasse
- cover.rollladen_kuche
- cover.rollladen_schlafzimmer
- id: '1652004328146'
alias: Jens Arbeit - nächster Termin beginnt (1 Minute)
description: ''
trigger:
- platform: calendar
event: start
entity_id: calendar.jens_work
offset: -0:1:0
alias: Termin in 1 Minute
condition:
- condition: state
entity_id: input_boolean.jens_im_urlaub
state: 'off'
alias: Jens ist nicht im Urlaub
- condition: state
entity_id: switch.plug_office_jens_desk
state: 'on'
alias: Schreibtisch Jens ist an
action:
- parallel:
- service: script.office_jens_alarm_red
data: {}
alias: Roter Alarm
- service: script.announcement
data:
message: Dein nächster Termin beginnt in einer Minute!
media_player: media_player.jens_beam
volume: 0.1
scene_name: snapshot_jens_echo
alias: Ansage
mode: single
- id: '1657609465015'
alias: Jens Arbeit - nächster Termin beginnt (5 Minuten)
description: ''
trigger:
- platform: calendar
event: start
entity_id: calendar.jens_work
offset: -0:5:0
alias: Termin in 5 Minuten
condition:
- condition: state
entity_id: input_boolean.jens_im_urlaub
state: 'off'
alias: Jens ist nicht im Urlaub
- condition: state
entity_id: switch.plug_office_jens_desk
state: 'on'
alias: Schreibtisch Jens ist an
action:
- parallel:
- service: script.office_jens_alarm_blue
data: {}
alias: Blauer Alarm
- service: script.announcement
data:
message: Dein nächster Termin beginnt in fünf Minuten!
media_player: media_player.jens_beam
volume: 0.1
scene_name: snapshot_jens_echo
alias: Ansage
mode: single
- id: '1668286009212'
alias: Büro Jens - Haustür klingelt
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.nuki_haustur_ring_action
from: 'off'
to: 'on'
alias: Haustuer klingelt
condition:
- condition: state
entity_id: person.jens
state: home
alias: Jens ist zu Hause
- condition: state
entity_id: switch.plug_office_jens_computer
state: 'on'
alias: Shaun ist an
- condition: state
entity_id: input_boolean.hauswachtermodus
state: 'off'
alias: Hauswächtermodus aus
action:
- service: script.turn_on
data: {}
target:
entity_id: script.office_jens_alarm_blue
alias: Büro Jens blauer Alarm
mode: single
- id: '1668286134487'
alias: Büro Jens - Jens Mobiltelefon klingelt
description: ''
trigger:
- platform: state
entity_id:
- sensor.pixel_6_phone_state
alias: Jens Mobiltelefon klingelt
to: ringing
from: idle
condition:
- condition: state
entity_id: person.jens
state: home
alias: Jens ist zu Hause
- condition: state
entity_id: switch.plug_office_jens_computer
state: 'on'
alias: Shaun ist an
- condition: state
entity_id: input_boolean.hauswachtermodus
state: 'off'
alias: Hauswächtermodus aus
action:
- service: script.turn_on
data: {}
target:
entity_id: script.office_jens_alarm_blue
alias: Büro Jens blauer Alarm
mode: single
- id: '1668289915940'
alias: Garage - Wallbox - Start
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.garage_ladestation_freischalten
from: 'off'
to: 'on'
alias: Ladestation wurde freigeschaltet
- platform: sun
event: sunrise
offset: 01:00:00
alias: Sonne ist seit einer Stunde aufgegangen
- platform: state
entity_id:
- input_boolean.garage_auto_nur_bei_sonne_laden
alias: Nur bei Sonne laden wurde geändert
- alias: Supergrün Phase gestartet
platform: state
entity_id:
- sensor.stromgedacht_schonaich
to: Supergrün
condition:
- condition: state
entity_id: input_boolean.garage_ladestation_freischalten
state: 'on'
alias: Ladestation ist freigeschaltet
- condition: state
entity_id: binary_sensor.keba_p30_plug
state: 'on'
alias: Fahrzeug verbunden
- alias: Soll gerade geladen werden?
condition: or
conditions:
- alias: CO2 armes Laden möglich?
condition: and
conditions:
- condition: state
entity_id: input_boolean.garage_auto_nur_bei_sonne_laden
state: 'on'
alias: Nur bei Sonne laden
- alias: Supergrün oder Sonne scheint
condition: or
conditions:
- alias: Supergrün Phase
condition: state
entity_id: sensor.stromgedacht_schonaich
state: 'Supergrün '
- condition: state
entity_id: sun.sun
state: above_horizon
alias: Sonne scheint
- condition: state
entity_id: input_boolean.garage_auto_nur_bei_sonne_laden
state: 'off'
alias: Immer laden
action:
- service: lock.unlock
data: {}
target:
entity_id: lock.keba_p30_authentication
alias: Ladestation entsperren
mode: single
- id: '1668351371197'
alias: Garage - Wallbox - Stop
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.garage_ladestation_freischalten
from: 'on'
to: 'off'
alias: Freischaltung Ladestation wurde aufgehoben
condition: []
action:
- service: lock.lock
data: {}
target:
entity_id: lock.keba_p30_authentication
alias: Ladestation sperren
mode: single
- id: '1668351425454'
alias: Garage - Wallbox - Pause
description: ''
trigger:
- platform: sun
event: sunset
alias: Sonne geht unter
- alias: Supergrün Phase endet
platform: state
entity_id:
- sensor.stromgedacht_schonaich
from: Supergrün
condition:
- condition: state
entity_id: lock.keba_p30_authentication
state: unlocked
alias: Ladestation ist freigeschaltet
- condition: state
entity_id: input_boolean.garage_auto_nur_bei_sonne_laden
state: 'on'
alias: Nur bei Sonne laden ist aktiv
action:
- service: lock.lock
data: {}
target:
entity_id: lock.keba_p30_authentication
alias: Ladestation sperren
mode: single
- id: '1668357645382'
alias: Garage - Wallbox - Auto verbunden - Benachrichtigung zum Anschalten
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.keba_p30_plug
from: 'off'
to: 'on'
alias: Fahrzeug verbunden
condition: []
action:
- alias: Variablen setzen
variables:
action_on: '{{ ''CONFIRM_'' ~ context.id }}'
action_off: '{{ ''DISMISS_'' ~ context.id }}'
- alias: Benachrichtigung an Jens
service: notify.mobile_app_pixel_6
data:
title: Wallbox verbunden
message: Ein Auto wurde zum Laden eingesteckt. Soll der Ladevorgang nun freigeschaltet
werden?
data:
tag: garage-wallbox-connected
actions:
- action: '{{ action_on }}'
title: Freischalten
- action: '{{ action_off }}'
title: Abbrechen
- alias: Benachrichtigung an Eva
service: notify.mobile_app_pixel_7
data:
title: Wallbox verbunden
message: Ein Auto wurde zum Laden eingesteckt. Soll der Ladevorgang nun freigeschaltet
werden?
data:
tag: garage-wallbox-connected
actions:
- action: '{{ action_on }}'
title: Freischalten
- action: '{{ action_off }}'
title: Abbrechen
enabled: true
- alias: Auf Antwort warten
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_on }}'
alias: Warten auf "Freischalten"
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_off }}'
alias: Warten auf "Abbrechen"
- alias: Aktion ausführen
choose:
- conditions: '{{ wait.trigger.event.data.action == action_on }}'
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.garage_ladestation_freischalten
data: {}
alias: Ladestation freischalten
- service: notify.mobile_app_pixel_6
data:
message: clear_notification
data:
tag: garage-wallbox-connected
alias: Benachrichtigung Jens löschen
- service: notify.mobile_app_pixel_7
data:
message: clear_notification
data:
tag: garage-wallbox-connected
alias: Benachrichtigung Eva löschen
- conditions: '{{ wait.trigger.event.data.action == action_off }}'
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.garage_ladestation_freischalten
data: {}
alias: Ladestation sperren
- service: notify.mobile_app_pixel_6
data:
message: clear_notification
data:
tag: garage-wallbox-connected
alias: Benachrichtigung Jens löschen
- service: notify.mobile_app_pixel_7
data:
message: clear_notification
data:
tag: garage-wallbox-connected
alias: Benachrichtigung Eva löschen
mode: single
- id: '1668371981039'
alias: Garage - Wallbox - Tracking - Fahrzeug getrennt
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.keba_p30_plug
from: 'on'
to: 'off'
alias: Fahrzeug getrennt
condition: []
action:
- service: input_number.set_value
data:
value: '{{ states(''sensor.keba_p30_total_energy'') }}'
target:
entity_id: input_number.ev_charging_ended_usage
alias: Gesamtverbrauch Ende merken
- service: input_datetime.set_datetime
data:
date: '{{ states(''sensor.date'') }}'
time: '{{ states(''sensor.time'') }}'
target:
entity_id: input_datetime.ev_charging_ended_time
alias: Endzeitpunkt merken
- service: input_number.set_value
data:
value: '{{ states(''sensor.keba_p30_session_energy'') }}'
target:
entity_id: input_number.ev_charging_ended_session_usage
alias: Sessionverbrauch merken
- alias: Variablen setzen
variables:
action_tesla: '{{ ''TESLA_'' ~ context.id }}'
action_fiat: '{{ ''FIAT_'' ~ context.id }}'
action_cancel: '{{ ''CANCEL_'' ~ context.id }}'
- alias: Benachrichtigung an Jens
service: notify.mobile_app_pixel_6
data:
title: EV geladen
message: Ein Auto wurde von der Wallbox getrennt. Wem soll der Verbrauch zugerechnet
werden?
data:
tag: garage-wallbox-disconnected
actions:
- action: '{{ action_tesla }}'
title: Tesla
- action: '{{ action_fiat }}'
title: Fiat
- action: '{{ action_cancel }}'
title: Ignorieren
- alias: Benachrichtigung an Eva
service: notify.mobile_app_pixel_7
data:
title: EV geladen
message: Ein Auto wurde von der Wallbox getrennt. Wem soll der Verbrauch zugerechnet
werden?
data:
tag: garage-wallbox-disconnected
actions:
- action: '{{ action_tesla }}'
title: Tesla
- action: '{{ action_fiat }}'
title: Fiat
- action: '{{ action_cancel }}'
title: Ignorieren
- alias: Auf Antwort warten
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_tesla }}'
alias: Tesla ausgewählt
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_fiat }}'
alias: Fiat ausgewählt
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_cancel }}'
alias: Ignorieren ausgewählt
timeout:
hours: 24
continue_on_timeout: true
- alias: Aktion ausfuehren
choose:
- conditions: '{{ wait.trigger.event.data.action == action_tesla }}'
alias: Tesla ausgewählt
sequence:
- service: google_sheets.append_sheet
data:
config_entry: fbb98a7acb25e1b3446eadb6068719ce
worksheet: Raw
data:
begin: '{{ states(''input_datetime.ev_charging_started_time'') }}'
begin_value: '{{ states(''input_number.ev_charging_started_usage'') }}'
end: '{{ states(''input_datetime.ev_charging_ended_time'') }}'
end_value: '{{ states(''input_number.ev_charging_ended_usage'') }}'
session: '{{ states(''input_number.ev_charging_ended_session_usage'')
}}'
vehicle: Tesla
alias: Google Sheets befüllen
- service: notify.mobile_app_pixel_6
data:
message: clear_notification
data:
tag: garage-wallbox-disconnected
alias: Benachrichtigung Jens löschen
- service: notify.mobile_app_pixel_7
data:
message: clear_notification
data:
tag: garage-wallbox-disconnected
alias: Benachrichtigung Eva löschen
- conditions: '{{ wait.trigger.event.data.action == action_fiat }}'
alias: Fiat ausgewählt
sequence:
- service: google_sheets.append_sheet
data:
config_entry: fbb98a7acb25e1b3446eadb6068719ce
worksheet: Raw
data:
begin: '{{ states(''input_datetime.ev_charging_started_time'') }}'
begin_value: '{{ states(''input_number.ev_charging_started_usage'') }}'
end: '{{ states(''input_datetime.ev_charging_ended_time'') }}'
end_value: '{{ states(''input_number.ev_charging_ended_usage'') }}'
session: '{{ states(''input_number.ev_charging_ended_session_usage'')
}}'
vehicle: Fiat
alias: Google Sheets befüllen
- service: notify.mobile_app_pixel_6
data:
message: clear_notification
data:
tag: garage-wallbox-disconnected
alias: Benachrichtigung Jens löschen
- service: notify.mobile_app_pixel_7
data:
message: clear_notification
data:
tag: garage-wallbox-disconnected
alias: Benachrichtigung Eva löschen
- conditions: '{{ wait.trigger.event is not defined }}'
alias: Nach Timeout nichts ausgewählt
sequence:
- service: google_sheets.append_sheet
data:
config_entry: fbb98a7acb25e1b3446eadb6068719ce
worksheet: Raw
data:
begin: '{{ states(''input_datetime.ev_charging_started_time'') }}'
begin_value: '{{ states(''input_number.ev_charging_started_usage'') }}'
end: '{{ states(''input_datetime.ev_charging_ended_time'') }}'
end_value: '{{ states(''input_number.ev_charging_ended_usage'') }}'
session: '{{ states(''input_number.ev_charging_ended_session_usage'')
}}'
vehicle: Unbekannt (Timeout)
alias: Google Sheets befüllen
- service: notify.mobile_app_pixel_6
data:
message: clear_notification
data:
tag: garage-wallbox-disconnected
alias: Benachrichtigung Jens löschen
- service: notify.mobile_app_pixel_7
data:
message: clear_notification
data:
tag: garage-wallbox-disconnected
alias: Benachrichtigung Eva löschen
- service: input_number.set_value
data:
value: 0
target:
entity_id:
- input_number.ev_charging_started_usage
- input_number.ev_charging_ended_usage
- input_number.ev_charging_ended_session_usage
alias: 'Zurücksetzen: Verbrauchswerte'
- service: input_datetime.set_datetime
data:
time: 00:00:00
date: '2000-01-01'
target:
entity_id:
- input_datetime.ev_charging_started_time
- input_datetime.ev_charging_ended_time
alias: 'Zurücksetzen: Zeitpunkte'
mode: single
- id: '1668372063252'
alias: Garage - Wallbox - Tracking - Fahrzeug verbunden
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.keba_p30_plug
from: 'off'
to: 'on'
alias: Fahrzeug verbunden
condition: []
action:
- service: input_number.set_value
data:
value: '{{ states(''sensor.keba_p30_total_energy'') }}'
target:
entity_id: input_number.ev_charging_started_usage
alias: Gesamtverbrauch Beginn merken
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.ev_charging_started_time
alias: Startzeitpunkt merken
data:
date: '{{ states(''sensor.date'') }}'
time: '{{ states(''sensor.time'') }}'
mode: single
- id: '1670086762819'
alias: Präsenz - Verlassen - Bei Dunkelheit
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'on'
to: 'off'
alias: Beim Verlassen
condition:
- condition: state
entity_id: input_boolean.licht_innen_dunkelheit
state: 'on'
alias: Bei Dunkelheit
action:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
alias: 1s warten
- service: light.turn_on
data: {}
target:
entity_id:
- light.livingroom_wall
- light.garden_lantern
- light.garden_ball_lamps
alias: Katzenlichter an
mode: single
- id: '1670087000286'
alias: Präsenz - Verlassen
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'on'
to: 'off'
alias: Beim Verlassen
condition: []
action:
- service: light.turn_off
data: {}
alias: Alle Lichter aus
target:
entity_id:
- light.bathroom_ceiling
- light.bathroom_mirror
- light.office_eva_ceiling
- light.shower_ceiling
- light.shower_mirror
- light.garden_ball_lamps
- light.garden_lantern
- light.guestroom_standinglight
- light.kitchen_ceiling
- light.kitchen_sink
- light.kitchen_cabinet
- light.kitchen_bar
- light.bedroom_ceiling
- light.bedroom_bed
- light.livingroom_dining
- light.livingroom_wall
- light.livingroom_reading
- light.livingroom_standinglight
- light.livingroom_ceiling
- light.office_jens_ceiling
- light.hallway_ceiling
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.plug_office_eva_voice_assistant
- switch.plug_shower_voice_assistant
- switch.plug_kitchen_coffeemachine
- switch.plug_bedroom_tv
- switch.plug_office_jens_printer
- switch.plug_bathroom_voice_assistant
- switch.plug_office_jens_desk
- switch.plug_office_eva_desk
- switch.plug_livingroom_multimedia
alias: Geräte aus
mode: single
- id: '1670087091881'
alias: Präsenz - Verlassen - Gruß
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'on'
to: 'off'
alias: Beim Verlassen
condition: []
action:
- service: script.announcement
data:
media_player: media_player.wallpanel
volume: 0.4
message: Komm gesund wieder. Ich halte hier die Stellung!
scene_name: snapshot_wallpanel
alias: Ansage
mode: single
- id: '1670088156629'
alias: Präsenz - Verlassen - Wohnungstür absperren
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'on'
to: 'off'
alias: Beim Verlassen
condition: []
action:
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.magnet_door_entrance_contact
from: 'on'
to: 'off'
alias: Wohnungstür wurde geschlossen
timeout:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
alias: Wohnungstür Innerhalb von maximal 2 Minuten geschlossen
continue_on_timeout: false
- alias: 3s warten
delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- service: lock.lock
data: {}
target:
entity_id: lock.nuki_wohnungstur_lock
alias: Wohnungstür abschließen
mode: single
- id: '1670095655562'
alias: Präsenz - Ankommen - Bei Dunkelheit
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'off'
to: 'on'
alias: Beim Ankommen
condition:
- condition: state
entity_id: input_boolean.licht_innen_dunkelheit
state: 'on'
alias: Bei Dunkelheit
action:
- service: light.turn_on
data: {}
target:
entity_id:
- light.livingroom_wall
- light.hallway_ceiling
alias: Lichter an
mode: single
- id: '1670095952412'
alias: Präsenz - Ankommen - Gruß
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'off'
to: 'on'
alias: Beim Ankommen
condition: []
action:
- service: script.announcement
data:
media_player: media_player.wallpanel
volume: 0.4
message: Willkommen zurück. Schön, dass du wieder da bist.
scene_name: snapshot_wallpanel
alias: Ansage
mode: single
- id: '1670096126996'
alias: Präsenz - Ankommen
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'off'
to: 'on'
alias: Beim Ankommen
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.plug_bathroom_voice_assistant
- switch.plug_shower_voice_assistant
- switch.plug_office_eva_voice_assistant
- switch.plug_livingroom_multimedia
alias: Geräte an
- alias: Terrassenrolladen hoch
service: cover.open_cover
data: {}
target:
entity_id:
- cover.rollladen_wohnzimmer_terrasse
mode: single
- id: '1670186909773'
alias: Präsenz - Verlassen - Lichtsignal
description: ''
trigger:
- platform: state
entity_id:
- input_boolean.presence
from: 'on'
to: 'off'
alias: Beim Verlassen
condition: []
action:
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
alias: 2s warten
- repeat:
count: 2
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.hallway_entrance
alias: Flurlicht an
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
alias: 1s warten
- service: light.turn_off
data: {}
target:
entity_id: light.hallway_entrance
alias: Flurlicht aus
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
alias: 1s warten
alias: Flurlicht Signal
mode: single
- id: '1670187850562'
alias: Taster - Flur - Präsenz
description: ''
trigger:
- platform: device
device_id: a957e702d58b22e39705eed339122f7e
domain: shelly
type: long_push
subtype: button2
alias: Schalter Flur Präsenz lange gedrückt
condition: []
action:
- service: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.presence
alias: Anwesenheit an/aus