I am really struggling with getting an automation to trigger for turning a relay off when a target humidity and temperature are reached. Essentially I want to turn off the relay when a temperature AND relative humidity are in a certain range.
In the most basic case I have the following in the states under developer tools:
It never triggers and when I manually execute it always shuts off the relay even though not all conditions are met. This is driving me crazy at the moment and am not sure how to go about fixing it.
Thank you, I had no idea it worked like that…my ignorance. Toggling it the way you said it works correctly, I think. However it still doesn’t trigger every minute. I assume that means something is still incorrect.
Interesting, I will give that a shot. Quick question on that. Is there a way to do AND/OR on those triggers or should I do an automation per range? Essentially I would like to turn it off like (I think):
- condition: or
conditions:
- condition: state
entity_id: sensor.liberty_hill_humidity_in
above: 35
below: 40
- condition: state
entity_id: sensor.liberty_hill_temp
above: 20
below: 50
- condition: or
conditions:
- condition: state
entity_id: sensor.liberty_hill_humidity_in
above: 30
below: 35
- condition: state
entity_id: sensor.liberty_hill_temp
above: 10
below: 20
- condition: or
conditions:
- condition: state
entity_id: sensor.liberty_hill_humidity_in
above: 25
below: 30
- condition: state
entity_id: sensor.liberty_hill_temp
above: 0
below: 10
- condition: or
conditions:
- condition: state
entity_id: sensor.liberty_hill_humidity_in
above: 20
below: 25
- condition: state
entity_id: sensor.liberty_hill_temp
above: -10
below: 0
- condition: or
conditions:
- condition: state
entity_id: sensor.liberty_hill_humidity_in
above: 15
below: 20
- condition: state
entity_id: sensor.liberty_hill_temp
above: -20
below: -10
So I ran into an issue where the trigger needs to have an above or below defined. I tried to set it to Above -100 and Above 0 thinking it will be triggered each time it changes but this still fails to trigger. Any other ideas how to get it to trigger on each temperature or humidity change?
Well its two different sensors. A humidity and a temperature. So I set humidity above 0% (always trigger) and temperature about -100 (should never be that cold here. Is there a way to tell if it was triggered? Maybe its an issue with my conditionals…I would expect the first AND under the OR to be valid. Since its 38 degrees outside and 37% humidity.
They trigger when crossing the above or below threshold. By setting the limits so wide your triggers will never occur because they will never cross these values.
Use these triggers to trigger on every change of state:
trigger:
- platform: state
entity_id: sensor.liberty_hill_temp
- platform: state
entity_id: sensor.liberty_hill_humidity_in