Skip to content

Commit 5a74f1d

Browse files
committed
Remove close bedroom blinds at sunrise.
No longer used.
1 parent 02d2c5a commit 5a74f1d

File tree

1 file changed

+33
-76
lines changed

1 file changed

+33
-76
lines changed

packages/rooms/bedroom/bedroom.yaml

Lines changed: 33 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,6 @@ automation:
3939
target:
4040
entity_id: cover.bedroom_blinds
4141
mode: single
42-
- id: "1600127180656"
43-
alias: "Bedroom: Close Blinds Before Sunrise"
44-
description: ""
45-
triggers:
46-
- trigger: sun
47-
event: sunrise
48-
offset: -02:00:00
49-
conditions:
50-
- condition: numeric_state
51-
entity_id: cover.bedroom_blinds
52-
attribute: current_position
53-
above: input_number.blind_open_position_threshold
54-
- condition: state
55-
entity_id: input_boolean.enable_bedroom_blind_automations
56-
state: "on"
57-
- condition: state
58-
entity_id: binary_sensor.bedroom_window_contact
59-
state: "off"
60-
actions:
61-
- parallel:
62-
- action: script.send_to_home_log
63-
data:
64-
message: >-
65-
:clock{{ now().strftime('%I') | int }}{% if now().minute | int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}:
66-
🌅 Bedroom blind is open and it's nearly sunrise. Closing blinds.
67-
title: "🛏️ bedroom"
68-
log_level: "Debug"
69-
- action: cover.close_cover
70-
target:
71-
entity_id: cover.bedroom_blinds
72-
mode: single
7342
- id: "1622667464880"
7443
alias: "Bedroom: Window Closed At Night"
7544
description: ""
@@ -685,16 +654,13 @@ automation:
685654
triggers:
686655
- trigger: time
687656
at: "08:00:00"
688-
id: "workday"
689-
- trigger: time
690-
at: "08:30:00"
691-
id: "083000"
657+
id: "080000"
692658
- trigger: time
693659
at: "09:00:00"
694660
id: "090000"
695661
- trigger: time
696-
at: "09:30:00"
697-
id: "093000"
662+
at: "10:00:00"
663+
id: "0100000"
698664
conditions:
699665
- condition: numeric_state
700666
entity_id: cover.bedroom_blinds
@@ -707,30 +673,43 @@ automation:
707673
entity_id: binary_sensor.bedroom_tv_powered_on
708674
state: "off"
709675
actions:
676+
- action: calendar.get_events
677+
target:
678+
entity_id:
679+
- calendar.danny_tsang_uk
680+
data:
681+
start_date_time: "{{ as_timestamp(now())|timestamp_custom('%Y-%m-%d %H:%M:%S') }}"
682+
duration:
683+
hours: 1
684+
minutes: 0
685+
seconds: 0
686+
response_variable: calendar
710687
- choose:
711-
- conditions:
688+
- alias: Work day
689+
conditions:
712690
- alias: Working day
713691
condition: state
714692
entity_id: binary_sensor.workday_sensor
715693
state: "on"
716694
- alias: No annual leave in calendar
717695
condition: template
718696
value_template: >-
719-
{{ 'Danny' not in state_attr('calendar.work','message')|string and
720-
'A/L' not in state_attr('calendar.work','message')|string and
721-
states('calendar.work') == 'off' }}
697+
{{ 'Danny' not in calendar['calendar.danny_tsang_uk'].events|string }}
698+
- condition: trigger
699+
id: "080000"
722700
sequence:
723-
- action: cover.open_cover
724-
target:
725-
entity_id: cover.bedroom_blinds
726-
- action: script.send_to_home_log
727-
data:
728-
message: >-
729-
:clock{{ now().strftime('%I') | int }}{% if now().minute | int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}:
730-
Opening blinds because it's closed on a working weekday!"
731-
title: "🛏️ bedroom"
732-
log_level: "Debug"
733-
- alias: Non workday and no children
701+
- parallel:
702+
- action: cover.open_cover
703+
target:
704+
entity_id: cover.bedroom_blinds
705+
- action: script.send_to_home_log
706+
data:
707+
message: >-
708+
:clock{{ now().strftime('%I') | int }}{% if now().minute | int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}:
709+
Opening blinds because it's closed on a working weekday!"
710+
title: "🛏️ bedroom"
711+
log_level: "Debug"
712+
- alias: Non workday and not in no children mode
734713
conditions:
735714
- condition: state
736715
entity_id: binary_sensor.workday_sensor
@@ -753,31 +732,9 @@ automation:
753732
Opening blinds because it's closed and its 09:00 on a weekend!"
754733
title: "🛏️ bedroom"
755734
log_level: "Debug"
756-
- alias: Non workday and no children
757-
conditions:
758-
- condition: state
759-
entity_id: binary_sensor.workday_sensor
760-
state: "off"
761-
alias: Non working day
762-
- condition: state
763-
entity_id: input_select.home_mode
764-
state: "No Children"
765-
- condition: trigger
766-
id: "093000"
767-
sequence:
768-
- action: cover.open_cover
769-
target:
770-
entity_id: cover.bedroom_blinds
771-
- action: script.send_to_home_log
772-
data:
773-
message: >-
774-
:clock{{ now().strftime('%I') | int }}{% if now().minute | int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}:
775-
Opening blinds because it's closed, there are no children and its 09:30 on a weekend!"
776-
title: "🛏️ bedroom"
777-
log_level: "Debug"
778735
- conditions:
779736
- condition: trigger
780-
id: "093000"
737+
id: "100000"
781738
sequence:
782739
- action: cover.open_cover
783740
target:
@@ -786,7 +743,7 @@ automation:
786743
data:
787744
message: >-
788745
:clock{{ now().strftime('%I') | int }}{% if now().minute | int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}:
789-
Opening blinds because it's closed and its 09:30!"
746+
Opening blinds because it's closed and its 10:00!"
790747
title: "🛏️ bedroom"
791748
log_level: "Debug"
792749
default: []

0 commit comments

Comments
 (0)