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
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):
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?