I have following automation:
- alias: "Activate manual mode with level 4 if humidity is too high"
trigger:
- platform: numeric_state
entity_id: sensor.bathroom_relative_humidity_11_5
above: 47
condition:
- condition: state
entity_id: 'sensor.mode'
state: 'auto'
action:
# activate manual mode
- service: shell_command.write_variable
data_template:
rtr: 5
variable: v00101
value: 1
# set fan level to 4
- service: shell_command.write_variable
data_template:
rtr: 5
variable: v00102
value: 4
- service: notify.ios_fabian_iphone
data:
title: "Manuelle Lüftung Stufe 4 aktiviert"
message: "Luftfeuchtigkeit im Bad: {{ states.sensor.bathroom_relative_humidity_11_5.state }}%"
- alias: "Activate automatic mode if humidity is ok"
trigger:
- platform: numeric_state
entity_id: sensor.bathroom_relative_humidity_11_5
below: 47
condition:
- condition: state
entity_id: 'sensor.mode'
state: 'manual'
action:
# activate manual mode
- service: shell_command.write_variable
data_template:
rtr: 5
variable: v00101
value: 0
- service: notify.ios_fabian_iphone
data:
title: "Automatische Lüftung aktiviert"
message: "Luftfeuchtigkeit im Bad: {{ states.sensor.bathroom_relative_humidity_11_5.state }}%"
Which basically sets the fan level to 4 (highest) for my house ventilation system if the humidity in the bathroom is above 47% and sets it back to automatic if it is below.
From time to time the “below” is not triggered. How can I find out why? Or does anyone have an idea why?
The sensor reports the state as I can see it in Grafana as well.
Thanks.