@Leon_van_Geul wrote:
I need help. I want that my fan is controlled with a switch and a slider. When the slider is higher then 0 the fan should turn of after …minutes(the slider goes from 0 to 10). But when the slider is on 0 I want the fan to turn on “forever”.
automation: - alias: vent_timer trigger: - platform: state entity_id: switch.ventilator_ventilator to: 'on' for: minutes: "{{ states('input_number.vent_time')|int }}" action: - entity_id: switch.ventilator_ventilator service_template: < {%- if input_number.vent_time > 0 -%} service: switch.turn_off {% endif %}
Posts: 2
Participants: 2