Trigger by comparing two entities - how?

I want an automation that would notify me to open the windows when outside temperature (entity A) gets lower than inside temp (entity B).

I have no idea how to compare these two entities in the Automations editor. Probably some sort of template but as a non-coder I can’t write this stuff myself. I have searched here but I only see Node Red workflows and I prefer not to run NR.

Any tips? Thanks!

2 Likes

That’s just a numeric_state trigger: https://www.home-assistant.io/docs/automation/trigger/#numeric-state-trigger

From an example in the docs:

automation:
  trigger:
    - platform: numeric_state
      entity_id: sensor.outside_temperature
      # Other entity ids can be specified for above and/or below thresholds
      above: sensor.inside_temperature
4 Likes

I had no idea you can use an entity in the above/below fields. Thank you so much!