Trigger notification when two conditions meet

Tags: #<Tag:0x00007f73988795c0>

Hi everyone, I’m new to hassio, I’ve been with it for a month and I’m generally very happy, every day I learn something new, unlike other systems I’ve never been stuck in a subject too long and I found sufficient resources in the Web.
I would like to know how to do the following:

I want to be notified when two conditions are met, specifically when the outside humidity is lower than the inside.

In my opinion, I need the trigger to be the condition that is gathered, but I do not know if it is possible to do so.

Excuse me for my English, I hope you understand me correctly

Thank you

A template trigger is probably what you’re looking for.

Use a template condition:
https://www.home-assistant.io/docs/scripts/conditions/

You can use a template trigger to make it work.

- alias: 'humiditysensors'
  trigger:
    platform: template
    value_template: '{% if states.sensor.insidehimidity.state > states.outsidehumidity.state %}true{% endif %}'
  condition: []
  action:
  - doyouractionshere

Just replace your sensors with the correct ones and make an action accordingly.

Thank you, I wil try

Has anything changed since this? I have a similar need that is not working with proposed solution. Help is welcome from anyone.
Here is my code (tryed many variants, using " and ’ also):

  - alias: "Audio System On"
    trigger:
      platform: template
      value_template: '{% if states.switch.led0_2.state > states.switch.led0_3.state %}on{% endif %}'
    condition: []
    action:
      - service: input_boolean.turn_on
        entity_id: input_boolean.audio_system

Action should be triggered when both switches are “on”.

The template we used for the OP, was for number values, so the template using the symbol > means that when “this – is bigger (>) than – that” then it would translate it into “true” state for the trigger.
In your case, you need to change the template to have it check if both values are “on”.
So you can use this on your template:

{% if is_state('switch.led0_2', 'on') and is_state('switch.led0_3', 'on') %}
  on
{% else %}
  off
{% endif %}

I am sure there is an easier way to do this, but I am not a template expert. This is what I came up with. I hope it helps.

Thanks for trying to help. As you see I am not a template expert either. Anyway, I am trying to figure out how your proposal would fit, since the template is working inside TRIGGER. How will it trigger the action this way? Am I missing something?

just put it inside this