I have a simple automation that switches the HVAC mode of a fan to cool (if its in heat) when motion is not detected for more than 45 in that room. It doesn’t seem to work though as the automation never gets triggered (says never for last run). Here’s the code:
alias: Change Basement Dyson Fan to Cool From Heat when no one is Present
description: ''
trigger:
- platform: state
entity_id: binary_sensor.basement_motion_detector
from: 'on'
to: 'off'
for:
hours: 0
minutes: 45
seconds: 0
condition:
- condition: device
device_id: 7b6ed082b252bd9cd1737754248
domain: climate
entity_id: climate.pure_hot_cool
type: is_hvac_mode
hvac_mode: heat
action:
- device_id: 7b6ed082b252bd9cd1737754248
domain: climate
entity_id: climate.pure_hot_cool
type: set_hvac_mode
hvac_mode: cool
mode: single
and heres a typical history of the the motion detector.