Skip to content

Commit

Permalink
Improve showering fan logic
Browse files Browse the repository at this point in the history
Use new button names
  • Loading branch information
golles committed Nov 29, 2024
1 parent 597923c commit 44694f0
Showing 5 changed files with 22 additions and 21 deletions.
22 changes: 12 additions & 10 deletions automations/badkamer/klimaat.yaml
Original file line number Diff line number Diff line change
@@ -18,29 +18,31 @@
actions:
- alias: Repeat setting the fan to high, to make sure it happens
repeat:
while:
sequence:
- alias: Set fan to high for 30 minutes
action: button.press
target:
entity_id: button.mechanische_ventilatie_30_minuten_extra_hoog
- delay:
seconds: 10
until:
- alias: While fan is low
condition: numeric_state
entity_id: fan.mechanische_ventilatie_ventilatie
attribute: percentage
below: 74
above: 74
- alias: Don't do it too many times
condition: template
value_template: "{{ repeat.index <= 5 }}"
sequence:
- alias: Set fan to high for 30 minutes
action: button.press
target:
entity_id: button.mechanische_ventilatie_30_minuten_hoog
- delay:
seconds: 10

- alias: Wait for occupancy to be off
- alias: Wait for occupancy to be off for 5 minutes
wait_for_trigger:
- trigger: state
entity_id: binary_sensor.douche_beweging_occupancy
from: "on"
to: "off"
for:
minutes: 5
timeout:
minutes: 45
continue_on_timeout: false
9 changes: 4 additions & 5 deletions automations/toilet/klimaat.yaml
Original file line number Diff line number Diff line change
@@ -13,8 +13,7 @@
attribute: percentage
below: 26
actions:
- alias: Occupancy detected, set fan speed
action: esphome.mechanische_ventilatie_set_speed_timer
data:
speed: 2 # 50%
timer: 15
- alias: Set fan to medium for 15 minutes
action: button.press
target:
entity_id: button.mechanische_ventilatie_15_minuten_medium
4 changes: 2 additions & 2 deletions automations/zolder/wasmachine.yaml
Original file line number Diff line number Diff line change
@@ -19,11 +19,11 @@
actions:
- choose:
- conditions:
# Only when the fan is set to low, we don't want to interfere with the shower automation.
# Only when the fan is set to low or medium, we don't want to interfere with the shower automation.
- condition: numeric_state
entity_id: fan.mechanische_ventilatie_ventilatie
attribute: percentage
below: 26
below: 51
sequence:
- alias: Turn on fan to reduce humidity
action: button.press
4 changes: 2 additions & 2 deletions lovelace/views/badkamer.yaml
Original file line number Diff line number Diff line change
@@ -99,6 +99,6 @@ sections:
name: Automatisch licht
icon: mdi:lightbulb-auto
- type: tile
entity: button.mechanische_ventilatie_15_minuten_hoog
name: 15 Minuten hoog
entity: button.mechanische_ventilatie_15_minuten_extra_hoog
name: 15 Minuten extra hoog
icon: mdi:fan
4 changes: 2 additions & 2 deletions lovelace/views/toilet.yaml
Original file line number Diff line number Diff line change
@@ -67,6 +67,6 @@ sections:
name: Automatisch licht
icon: mdi:lightbulb-auto
- type: tile
entity: button.mechanische_ventilatie_15_minuten_hoog
name: 15 Minuten hoog
entity: button.mechanische_ventilatie_15_minuten_medium
name: 15 Minuten medium
icon: mdi:fan

0 comments on commit 44694f0

Please sign in to comment.