Hello
I have a VMC machine that exchanges air in a room.
I will like it to run every 20 minutes each hour from a given time in the morning to a given time in the evening.
I made a simple automation that toggles the VMC switch every 20 minutes, it works fine but I will like it to turn off the switch at the end of the activation period.
How can I accomplish this task?
Here is my automation
alias: turn on VMC every 20 min
description: ""
trigger:
- platform: time_pattern
minutes: /20
condition:
- condition: time
after: "07:00:00"
before: "21:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.vmc_switch
mode: single