My Bathroom fan automation stopped working

I have had a bathroom fan automation which I made that has worked for years. IT has suddenly stopped working during the last couple of updates. All my sensors are working and my humidity rising is triggering to on yet the automation no longer runs. I can switch the fan on manually by running the automation trigger. At the moment I cannot see why it would no longer run automatically ???
Anyone see anything in my automation that has maybe changed in the last few updates ???

# Bathroom Fan Automations

# Auto on

  - alias: "Bathroom Fan auto on - Switch off"
    trigger:
      - platform: state
        entity_id: binary_sensor.bathroom_humidity_rising
        from: "off"
        to: "on"
    condition:
      - condition: state
        entity_id: input_boolean.bathroom_fan_dummy
        state: "off"
    action:
      - service: switch.turn_on
        entity_id: switch.lightwaverf_siemens_f296b3_7
      - service: input_boolean.turn_on
        entity_id: input_boolean.bathroom_fan_auto

  - alias: "Bathroom Fan auto on - Switch On"
    trigger:
      - platform: state
        entity_id: binary_sensor.bathroom_humidity_rising
        from: "off"
        to: "on"
    condition:
      - condition: state
        entity_id: input_boolean.bathroom_fan_dummy
        state: "on"
    action:
      - service: input_boolean.turn_on
        entity_id: input_boolean.bathroom_fan_auto

# Auto off
    
  - alias: "Bathroom Fan auto off - Switch off"
    trigger:
      - platform: state
        entity_id: binary_sensor.bathroom_humidity_falling
        from: "off"
        to: "on"
    condition:
      - condition: state
        entity_id: input_boolean.bathroom_fan_dummy
        state: "off"
    action:
      - service: switch.turn_off
        entity_id: switch.lightwaverf_siemens_f296b3_7
      - service: input_boolean.turn_off
        entity_id: input_boolean.bathroom_fan_auto
        
  - alias: "Bathroom Fan auto off - Switch on"
    trigger:
      - platform: state
        entity_id: binary_sensor.bathroom_humidity_falling
        from: "off"
        to: "on"
    condition:
      - condition: state
        entity_id: input_boolean.bathroom_fan_dummy
        state: "on"        
    action:
      - service: input_boolean.turn_off
        entity_id: input_boolean.bathroom_fan_auto

# Manual on / off
        
  - alias: "Bathroom Fan on"
    trigger:
      - platform: state
        entity_id: input_boolean.bathroom_fan_dummy
        from: "off"
        to: "on"
    action:
      - service: switch.turn_on
        entity_id: switch.lightwaverf_siemens_f296b3_7
        
  - alias: "Bathroom Fan off"
    trigger:
      - platform: state
        entity_id: input_boolean.bathroom_fan_dummy
        from: "on"
        to: "off"
    condition:
      - condition: state
        entity_id: input_boolean.bathroom_fan_auto
        state: "off"    
    action:
      - service: switch.turn_off
        entity_id: switch.lightwaverf_siemens_f296b3_7
        

Do you have HA 2021.4? Otherwise I would suggest updating an opening the great new Automation debugger :slight_smile:

Also, it is possible to do all this in 2 o(or even one) automation :slight_smile:

Yes I do have that version but I notice it asks for a unique ID before debugging. Where do I put that and how is it laid out ?

Ah, yeah, you made the automations in yaml. An unique id is mandatory to work with an automation in the UI. Add a unique id to every automation, for example:

  - alias: "Bathroom Fan auto on - Switch off"
    id: bathroom_fan_on_off
    trigger:
      - platform: state
        entity_id: binary_sensor.bathroom_humidity_rising
        from: "off"
        to: "on"
    condition:
      - condition: state
        entity_id: input_boolean.bathroom_fan_dummy
        state: "off"
    action:
      - service: switch.turn_on
        entity_id: switch.lightwaverf_siemens_f296b3_7
      - service: input_boolean.turn_on
        entity_id: input_boolean.bathroom_fan_auto
1 Like

Looks like binary_sensor.bathroom_humidity_rising is not changing to on.
The falling is triggering though which leads me to wonder wether the yaml in this binary sensor is now wrong due to updates ?

 - platform: trend
   sensors:
      bathroom_humidity_rising:
        entity_id: sensor.thgr810_thgn800_ae_01_humidity
        #max_samples: 2
        sample_duration: 600
        min_gradient: 0.04
        
      bathroom_humidity_falling:
        entity_id: sensor.thgr810_thgn800_ae_01_humidity
        #max_samples: 2
        sample_duration: 600
        min_gradient: -0.002

Right further updates I have the automation triggering but it is never switching the fan on. I can manually trigger the fan switch no problem. So can anyone see anything wrong here please ?

I also see this too.

Executed: 10 April 2021, 14:04:45
Result:

params:
  domain: switch
  service: turn_on
  service_data: {}
  target:
    entity_id:
      - switch.lightwaverf_siemens_f296b3_7
running_script: false
limit: 10

And

Executed: 10 April 2021, 14:04:45
Result:

params:
  domain: input_boolean
  service: turn_on
  service_data: {}
  target:
    entity_id:
      - input_boolean.bathroom_fan_auto
running_script: false
limit: 10

Ok this issue has been resolved and I haven’t changed a thing. I did reboot several times but that had no effect. All I have done is disabled all the automations and re ran them in order. Since then they are triggering perfectly so it seems maybe something went a little screwy after an update.

1 Like

Mm, bit weird indeed. But maybe now is a good time to simplify the automations?