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!


That’s just a numeric_state trigger:

From an example in the docs:

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

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