Automation is not being triggered

Simple automation using current temperature off of Honeywell RTH9585WF thermostat is working fine - it can turn any device on, etc. The same automation using humidity data off of the thermostat is never triggered.
Any ideas what I could be missing? Thanks.

Can you please post your automation code.

To do that, go to the automation’s page, click the three dots and choose Edit in YAML.

Copy all of the code that it shows, starting with alias to the end.

Using the </> button, paste it in here so it looks like this:

alias: Pump restart
description: Restarts the aquarium pump after 40 mins off
triggers:
  - trigger: state
[and so on]

If it doesn’t look like that in the preview, don’t click Reply until it does.

Please also supply a screenshot from Developer Tools / States for your thermostat, including the State and Attributes column, like this:

Temperature

alias: Main Level temperature
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.main_level_temperature
    for:
      hours: 0
      minutes: 0
      seconds: 30
    below: 68
conditions: []
actions:
  - type: turn_on
    device_id: 3c3f2b3e69f43a2c6846051c75a5f353
    entity_id: 13786e43d48e30c8fcb3227102e7186c
    domain: switch
mode: single

Humidity

alias: Main Level humidity
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.main_level_humidity
    for:
      hours: 0
      minutes: 0
      seconds: 30
    below: 35
conditions: []
actions:
  - type: turn_off
    device_id: 3c3f2b3e69f43a2c6846051c75a5f353
    entity_id: 13786e43d48e30c8fcb3227102e7186c
    domain: switch
mode: single

I am going to reply on this topic so I can follow this as I have the exact same problem with the automation not being triggered anymore by the humidity value.
Only for me the automation worked for many years and since a couple of months (unfortunately I don’t know exactly when) it broke somehow. I am thinking due to an upgrade.
So I am waiting and watching this thread in the hope a solution is found which I also can try out. If that doesn’t work I’ll start a new thread :crossed_fingers:

So do you have separate sensors sensor.main_level_temperature and sensor.main_level_humidity? Can we see those too please?

Assuming they do exist, you should be aware that numeric state triggers only fire when the value crosses the boundary. If it’s already “dry” when you start it up (which your screenshot suggests it is at the moment), it won’t fire until the humidity goes above and then below the threshold.

If that’s a problem, add a couple of triggers and a condition:

triggers:
  - trigger: numeric_state
    entity_id: sensor.main_level_humidity
    for:
      hours: 0
      minutes: 0
      seconds: 30
    below: 35
  - trigger: homeassistant
    event: start
  - trigger: event
    event_type: automation_reloaded
conditions:
  - condition: numeric_state
    entity_id: sensor.main_level_humidity
    below: 35
[etc.]

Those are sensors of the Honeywell thermostat. Automation is triggered fine by temperature changes but not the humidity.

Can I see a screenshot of the humidity sensor like you did for the climate entity please, as well as a history graph?

Are there any traces available for the humidity automation?


No traces. Humidity automation never fires.

1 Like

From that graph, it should have triggered at noon yesterday but not since then.

I’ve been changing the humidity trigger value throughout the day to ‘catch’ the change. It never triggered the automation. Works fine with temperature.

When you’ve been “changing the humidity trigger value”, did you restart HA or reload automations each time?

  • Make sure the threshold is significantly higher than current humidity.
  • Restart HA
  • Use Developer Tools / States to force the humidity sensor state to 100

Automation ought to trigger 30s after the next real reading comes in. Does it?

If not, could we have a screenshot of the UI view of this automation please?

I did reload yaml every time I made change.

Are you referring to the option, reload “ALL YAML CONFIGURATION” or reload “AUTOMATIONS”?

forcing the humidity sensor state to 100 triggered the automation!

1 Like

So, Troon, you think the solution is to have the threshold significantly higher?

The Numeric State Trigger you created will trigger when the humidity decreases from above 35 to a value below 35 (and then remains below 35 for at least 30 seconds). In other words, it triggers the moment the humidity crosses the threshold value of 35.

It means that after humidity has decreased below 35, the Numeric State Trigger will never trigger again until the humidity first increases above 35, then decreases below it.

It’s the crossing of the threshold (from above to below) that causes triggering.

No. I think it’s probably working as it should looking at the graphs. Keep an eye on it going forwards and if you think it should have triggered but didn’t, repost including an updated history graph and the current YAML.

All my trick did was to force a threshold crossing.

OK, so I just need to add the code you provided then.