Got a temperature sensor and I need to make sure that my fan switch is OFF when the temperature is within the (18C, 21C) range, and ON outside of this range. The OFF part works fine, but the ON does not. What am I doing wrong?
Here’s the OFF yaml:
alias: Gabe's fan OFF
description: ""
trigger:
- type: temperature
platform: device
device_id: cce31f7baee6b00cedc9178847d7c01e
entity_id: 5cf1a7f469c5fee78ef19b2becd6b634
domain: sensor
above: 18
below: 21
condition: []
action:
- type: turn_off
device_id: 6005320f572f169d9ae6e355455a8163
entity_id: d13dbbf26106c1d40ebdc1917b65a0e0
domain: switch
mode: single
And here’s the ON yaml:
alias: Gabe's fan ON
description: ""
trigger:
- type: temperature
platform: device
device_id: cce31f7baee6b00cedc9178847d7c01e
entity_id: 5cf1a7f469c5fee78ef19b2becd6b634
domain: sensor
above: 21
below: 18
condition: []
action:
- type: turn_on
device_id: 6005320f572f169d9ae6e355455a8163
entity_id: d13dbbf26106c1d40ebdc1917b65a0e0
domain: switch
mode: single