From 44694f04d3465cd13eec4b430964058aff4932ad Mon Sep 17 00:00:00 2001 From: golles Date: Fri, 29 Nov 2024 10:56:05 +0000 Subject: [PATCH] Improve showering fan logic Use new button names --- automations/badkamer/klimaat.yaml | 22 ++++++++++++---------- automations/toilet/klimaat.yaml | 9 ++++----- automations/zolder/wasmachine.yaml | 4 ++-- lovelace/views/badkamer.yaml | 4 ++-- lovelace/views/toilet.yaml | 4 ++-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/automations/badkamer/klimaat.yaml b/automations/badkamer/klimaat.yaml index 0924b6e..3971a15 100644 --- a/automations/badkamer/klimaat.yaml +++ b/automations/badkamer/klimaat.yaml @@ -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 diff --git a/automations/toilet/klimaat.yaml b/automations/toilet/klimaat.yaml index 51949b7..5490998 100644 --- a/automations/toilet/klimaat.yaml +++ b/automations/toilet/klimaat.yaml @@ -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 diff --git a/automations/zolder/wasmachine.yaml b/automations/zolder/wasmachine.yaml index 23dafad..696c274 100644 --- a/automations/zolder/wasmachine.yaml +++ b/automations/zolder/wasmachine.yaml @@ -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 diff --git a/lovelace/views/badkamer.yaml b/lovelace/views/badkamer.yaml index 50038bd..1fdd39a 100644 --- a/lovelace/views/badkamer.yaml +++ b/lovelace/views/badkamer.yaml @@ -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 diff --git a/lovelace/views/toilet.yaml b/lovelace/views/toilet.yaml index 8dce6ce..0ddebd7 100644 --- a/lovelace/views/toilet.yaml +++ b/lovelace/views/toilet.yaml @@ -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