I’m trying to set up an automation that activates “boost mode” on my ventilation system when the bathroom humidity goes above a certain level. Within the same automation I also want to turn boost mode off if humidity falls below another lever, and I want a button to force boost off - in case the user is in the bath and don’t want to listen to the ventilation right now.
However, I can’t get this to work. No matter which trigger I activate, the button or the humidity sensors, no action is performed. The trace is always “Choose: No action executed”
Can you see what I’m doing wrong?
(the actions work; switch.ftx_boost can turn_on and turn_off correctly when I run them manually.)
alias: Ventilation Control - Bathroom Humidity
description: Manage boost mode on the ventilation system in response to bathroom humidity and manual override.
trigger:
# Trigger for high humidity to turn on boost
- platform: device
device_id: 342d6a8703e4223f16fee46888880014
entity_id: sensor.7adcffd4d7e5aef6880d7b76eedc4d9e
domain: sensor
type: humidity
above: 75
for:
hours: 0
minutes: 1
seconds: 0
# Trigger for low humidity to turn off boost
- platform: device
device_id: 342d6a8703e4223f16fee46888880014
entity_id: sensor.7adcffd4d7e5aef6880d7b76eedc4d9e
domain: sensor
type: humidity
below: 65
for:
hours: 0
minutes: 5
seconds: 0
# Trigger for button press to manually turn off boost
- platform: device
device_id: 60d20024b8c64073f4657697e96c1e9b
domain: zha
type: remote_button_short_press
subtype: turn_on
condition: []
action:
- choose:
# Case 1: High humidity - Turn on boost
- conditions:
- condition: template
value_template: "{{ trigger.type == 'humidity' and trigger.above == 75 }}"
sequence:
- service: switch.turn_on
target:
entity_id: switch.ftx_boost
# Case 2: Low humidity - Turn off boost
- conditions:
- condition: template
value_template: "{{ trigger.type == 'humidity' and trigger.below == 65 }}"
sequence:
- service: switch.turn_off
target:
entity_id: switch.ftx_boost
# Case 3: Manual override - Turn off boost
- conditions:
- condition: template
value_template: "{{ trigger.type == 'remote_button_short_press' and trigger.subtype == 'turn_on' }}"
- condition: state
entity_id: switch.ftx_boost
state: 'on'
sequence:
- service: switch.turn_off
target:
entity_id: switch.ftx_boost
mode: single