@prexer wrote:
I can get a basic automation to turn the fan off, on, or set a speed, but when I try to get it all into one automation that sets the fan speed based on the temperature differential between upstairs and downstairs, it doesn’t seem to work. I’m assuming there’s something wrong with my templating syntax, but I can’t seem to get it ironed out.
automation: - alias: fans to different speeds trigger: platform: time_pattern minutes: "/1" action: service: fan.set_speed entity_id: - fan.kitchen_fan data_template: speed: > {% if (abs(climate.main_floor.current_temperature - climate.upstairs.current_temperature) <2) -%} off {%- elif (abs(climate.main_floor.current_temperature - climate.upstairs.current_temperature) >5) -%} 4 {%- else -%} 2 {%- endif -%}
Posts: 1
Participants: 1