If then else struggle

hi I am strugling with the IF then Else in Yaml. I tried via the settings/automation but it won’t help.
I have a thermostat with 2 variables:

  • the temperature via the sensor and the the temperature that I want to have is via the thermostat
    if the temperature via the sensor is lower than what I want, then all me aircos should start blowing heat.
    But I can’t start with the if then else part, saying compairing the 2 variables.
    Can you help me?
    thank you very much

If/Then is a type of automation action. On their own, actions don’t do anything. How are you triggering your automation? Please
show your workings (Community Guidlines #9)

Numeric State triggers can accept the entity id of number helpers (input_number entities), number and sensor entities that contain a numeric value in the above and below thresholds.

trigger:
  - platform: numeric_state
    entity_id: climate.your_aircon
    attribute: temperature
    above: sensor.current_temperature
condition: []
action:
  - service: climate.turn_on
    data: []
    target:
      entity_id: climate.your_aircon

This is a basic sketch since you have provided very little information about your entities and setup. Depending on how you have your entities configured and the specifics of what you want to do, you may also be interested in these other options:

1 Like