Hi all
I’ve automation to turn off the fan when the temperature drops below 24.5 degrees, only during 11 pm and 9 am in the morning. However, when the temperature drops below 24.5 at 10:30 pm as example, the automation condition has failed due to the time and then when the temperature is even 22 degrees after 11 pm , it doesn’t work. The code is below. Any help is appreciated
alias: Temp
description: ""
trigger:
- type: temperature
platform: device
device_id: xxxx
entity_id: sensor.xxxx_temperature
domain: sensor
below: 24.5
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: time
before: "09:00:00"
after: "21:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- type: turn_off
device_id: xxxxx
entity_id: xxxx
domain: switch
mode: single