So I thought a simple automation with time pattern trigger during set time condition but I can’t get it to work. Ran it manually and also tried once last night changing to 2 minutes and it appeared to try and run outside time condition and recognized it didn’t meet criteria. Here’s the code:
alias: Vegetable fan every 2 hours
description: ""
trigger:
- platform: time_pattern
hours: "2"
condition:
- condition: time
after: "06:00:00"
before: "20:00:00"
action:
- type: turn_on
device_id: a171498f371b3745d52ec188525f2666
entity_id: switch.backyard_plug
domain: switch
mode: single