Temperature Automation Problem

Hello, I need help. I want A fan to switch on when I set the temp on the User Interface
I tried the below code but it is not working

FAAN

  alias: Turn on Fan unit
  trigger:
    platform: template
    value_template: '{{ states(''sensor.living_room_temperature'') == (states.input_number.temp_condition.attributes.timestamp
      | int | timestamp_custom(''%H:%M'', False)) }}'
    #entity_id: input_number.temp_condition
  action:
  - service: switch.turn_on
    entity_id: switch.sonoff1```

You are comparing a temperature (as a string) to a timestamp. :roll_eyes:

What exactly are you trying to do?

Turn on the fan when the temperature equals the set point in the input number?

If so, try this:

    value_template: "{{ states('sensor.living_room_temperature')|float >= states('input_number.temp_condition')|float)"

Thank you guys i figured out the solution :smile:

do tell us

1 Like