Automation "if sensor > sensor, do sth" doesnt work

Hi,

I want to build an automation but it doesnt work/start.

If the temperature from the sensor at the radiator is 3°C higher, than the temperature sensor from the room, and the window is closed for 10 minutes, the shelly plug should turn on (and start a fan).

I have the following automation, but it doenst get triggered/started. Could anyone help please?

alias: "Auto: Lüfterbad einschalten"

triggers:
  - value_template: >-
      {{ states('sensor.sb_badheizung_temp') | float >
      (states('sensor.lumi_lumi_weather_temperature_5') | float + 3) }}
    trigger: template
    for:
      hours: 0
      minutes: 0
      seconds: 30
conditions:
  - condition: state
    entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
    state: "off"
    for: "00:10:00"
  - condition: device
    type: is_off
    device_id: b0e5676428783ec665461e0246a8bd34
    entity_id: 60699903c19bbb831de7149b77be4d90
    domain: switch
actions:
  - type: turn_on
    device_id: b0e5676428783ec665461e0246a8bd34
    entity_id: 60699903c19bbb831de7149b77be4d90
    domain: switch
mode: single

Hi BoneCS,

I’m guessing this is your problem.

Thanks a lot, that was indeed the solution.

1 Like