I an running Home Assistant 2021.12.9 on a linux hosted VM.
My objective, simplified, is to compare an aerq temperature and humidity sensor (aerq_temp) with an Ecobee sensor (eco_temp) and if the aerq_temp is above the eco_temp then the action would be to start the ceiling fan. The automation created below provided the expected results using the template editor but gives “false” results to all options when traced. I also have had problems getting the automation triggered with only platform: state so I added platform: time_pattern to try to isolate the issue(s). I would appreciate a review of the automation and suggestions.
alias: MBR Ceiling Fan
description: ''
trigger:
- platform: state
entity_id: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3
for:
hours: 0
minutes: 0
seconds: 0
to: 'null'
- platform: time_pattern
minutes: /5
seconds: '*'
hours: '*'
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: >-
"{{
states('sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3')
| float > states('sensor.master_bedroom_temperature') | float }}"
sequence:
- service: fan.set_percentage
target:
device_id: a80f9d842ef5e10e5f0e04896d3f4721
data:
percentage: 30
- conditions:
- condition: template
value_template: >-
"{{
states('sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3')
| float <= states('sensor.master_bedroom_temperature') | float }}"
sequence:
- service: fan.set_percentage
target:
device_id: a80f9d842ef5e10e5f0e04896d3f4721
data:
percentage: 0
- conditions:
- condition: template
value_template: >-
"{{
states('sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3')
| float < 70.0 }}"
sequence:
- service: fan.set_percentage
target:
device_id: a80f9d842ef5e10e5f0e04896d3f4721
data:
percentage: 0
default: []
mode: queued
max: 10