Ecobee humidity trigger automation not working

One of my first automation that was working fine, but now sporadically works. I can see the Ecobee humidity updating normally (Homekit controller connected). I am on the latest 2023.4 release.

alias: Master humidifier
description: ""
trigger:
  - platform: device
    device_id: f02f866a5365023fffbf8c3a1b8b6a3b
    domain: climate
    entity_id: climate.downstairs
    type: current_humidity_changed
    below: 45
condition:
  - condition: or
    conditions:
      - type: is_humidity
        condition: device
        device_id: f02f866a5365023fffbf8c3a1b8b6a3b
        entity_id: sensor.downstairs_current_humidity
        domain: sensor
        below: 40
      - condition: and
        conditions:
          - type: is_temperature
            condition: device
            device_id: f02f866a5365023fffbf8c3a1b8b6a3b
            entity_id: sensor.downstairs_current_temperature
            domain: sensor
            below: 72
          - type: is_humidity
            condition: device
            device_id: f02f866a5365023fffbf8c3a1b8b6a3b
            entity_id: sensor.downstairs_current_humidity
            domain: sensor
            below: 45
action:
  - type: turn_on
    device_id: d85dadb0c4f778dc3ae8932f6ab378f2
    entity_id: switch.master_humidifier_switch_2
    domain: switch
  - choose:
      - conditions:
          - type: is_temperature
            condition: device
            device_id: f02f866a5365023fffbf8c3a1b8b6a3b
            entity_id: sensor.downstairs_current_temperature
            domain: sensor
            above: 72
        sequence:
          - wait_for_trigger:
              - type: humidity
                platform: device
                device_id: f02f866a5365023fffbf8c3a1b8b6a3b
                entity_id: sensor.downstairs_current_humidity
                domain: sensor
                above: 40
                for:
                  hours: 0
                  minutes: 5
                  seconds: 0
            timeout:
              hours: 0
              minutes: 10
              seconds: 0
              milliseconds: 0
            continue_on_timeout: true
          - type: turn_off
            device_id: d85dadb0c4f778dc3ae8932f6ab378f2
            entity_id: switch.master_humidifier_switch_2
            domain: switch
    default:
      - wait_for_trigger:
          - type: humidity
            platform: device
            device_id: f02f866a5365023fffbf8c3a1b8b6a3b
            entity_id: sensor.downstairs_current_humidity
            domain: sensor
            above: 45
            for:
              hours: 0
              minutes: 5
              seconds: 0
        timeout:
          hours: 0
          minutes: 15
          seconds: 0
          milliseconds: 0
        continue_on_timeout: true
      - type: turn_off
        device_id: d85dadb0c4f778dc3ae8932f6ab378f2
        entity_id: switch.master_humidifier_switch_2
        domain: switch
mode: restart

Ok, I have got some assistantance on Reddit and it looks like there might be a bug in how the Ecobee connected homekit data is being handled. I tried switching to a numeric_state instead of device and it will work for a while then stop. The Ecobee is reported consistently and I made a simple automation that sends a notification ANYTIME the Ecobee reports humidity which should have blown up my phone. But got random notifications. How do I troubleshoot automation triggers?

Check the automation’s trace.

BTW, what’s the relationship between the humidity reported by the climate and sensor entities? The automation’s trigger uses climate whereas its wait_for_trigger uses the sensor. How are the two entities related (if at all)?

I downgraded to 2023.1 and it works again. I can upgrade back to a current version, but how to I troubleshoot a trigger not firing?

This works 100% on 2023.1. It’s not triggering (tried adding both device and numeric_state just to test it. So can’t trace what’s not getting triggered.

Also I simplified the automation:

alias: Master humidifier
description: ""
trigger:
  - type: humidity
    platform: device
    device_id: f02f866a5365023fffbf8c3a1b8b6a3b
    entity_id: sensor.downstairs_current_humidity
    domain: sensor
    below: 45
    enabled: true
  - platform: numeric_state
    entity_id: sensor.downstairs_current_humidity
    below: 45
condition:
  - condition: or
    conditions:
      - type: is_humidity
        condition: device
        device_id: f02f866a5365023fffbf8c3a1b8b6a3b
        entity_id: sensor.downstairs_current_humidity
        domain: sensor
        below: 40
      - condition: and
        conditions:
          - type: is_humidity
            condition: device
            device_id: f02f866a5365023fffbf8c3a1b8b6a3b
            entity_id: sensor.downstairs_current_humidity
            domain: sensor
            below: 45
          - type: is_temperature
            condition: device
            device_id: f02f866a5365023fffbf8c3a1b8b6a3b
            entity_id: sensor.downstairs_current_temperature
            domain: sensor
            below: 73
action:
  - type: turn_on
    device_id: d85dadb0c4f778dc3ae8932f6ab378f2
    entity_id: switch.master_humidifier_switch_2
    domain: switch
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: d85dadb0c4f778dc3ae8932f6ab378f2
    entity_id: switch.master_humidifier_switch_2
    domain: switch
mode: restart