The goal
I want to reduce the humidity inside my shed as much as possible. To acheive that, I have a fan and 2 sensors, one inside the shed and the other one outside.
I want the fan to turn on when the humidity is lower outside than outside and turn off otherwise.
My automation
I built an automation in HA, which is working when manually triggered, but for some reason it’s not triggering automatically. I can’t find what is missing and there’s nothing in the logs.
automations.yaml
(auto-on script… the auto-off is very similar)
- id: shed_vent_on
alias: VENT Shed auto-ON
trigger:
- above: '0'
below: '100'
entity_id: sensor.0x00158d00022cd579_humidity
platform: numeric_state
- above: '0'
below: '100'
entity_id: sensor.0x00158d000202992f_humidity
platform: numeric_state
condition:
- condition: template
value_template: '{{ (state_attr(''sensor.0x00158d00022cd579_humidity'', humidity)|float)
> (state_attr(''sensor.0x00158d000202992f_humidity'', humidity)|float) + 0.75
}}'
action:
- data:
entity_id: switch.shed_vent_switch
service: switch.turn_on
Anybody here can help me spot what is missing?