Input booleans in automations

I use input booleans to flag various states, and they are controlled both manually and via automation (imagine: bathroom ventilation request input boolean, can be pressed by hand or signaled via automation based on other conditions).

It appears that the automations do not always successfully change the input toggle position, even with repeat attempts. I have a time-period automation that successfully executes and shows all greens on the conditions but still fails to actually change the state of the input boolean. No other automation or button is interacting with this input boolean, it exists only in one place.

Share your automation yaml and a full trace.

I'm not sure how that would help, the automation is running correctly and the trace is running through the correct path. The only action in this branch of the automation is the "Input boolean: Turn off input boolean" action. The action simply... doesn't do it. I noticed this behavior on other automations as well, and even rebooted the system to try to clear out any old state information without success.

TBH this is really a bug report, but IDK where to put that kind of thing.

It is obviously not "running correctly".

And there is nothing wrong with the service.

Share the info so we can see what you need to change.

Pasted both below, I think. I don’t really know what you want from the “trace”. I don’t know how to hunt through the history of the automation, but it doesn’t matter because the trace says “nothing changed” but the boolean is clearly being changed (set to “on” incorrectly, never being set back to “off” correctly) and pointing back at the automation as the source of the change. It will actually actively set the boolean back to on if you manually turn it off, which is completely backward.

I don’t have a lot of interest litigating whether or not it’s broken or configured incorrectly. It’s configured correctly, the service is definitely broken. Somebody can look for the bug or not. I’ve found the HA communities to be fairly hostile so I frankly don’t care to dig too deep or work too hard on it.

{
  "trace": {
    "last_step": "action/0/choose/2/sequence/0",
    "run_id": "d93e565330b4182fe8189d6b219a638d",
    "state": "stopped",
    "script_execution": "finished",
    "timestamp": {
      "start": "2026-07-08T23:57:35.143292+00:00",
      "finish": "2026-07-08T23:57:35.143930+00:00"
    },
    "domain": "automation",
    "item_id": "1783024864428",
    "trigger": "time pattern",
    "trace": {
      "trigger/0": [
        {
          "path": "trigger/0",
          "timestamp": "2026-07-08T23:57:35.143343+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.hood_ventilation",
              "state": "on",
              "attributes": {
                "id": "1783024864428",
                "last_triggered": "2026-07-08T23:57:30.143349+00:00",
                "mode": "single",
                "current": 0,
                "friendly_name": "Hood ventilation"
              },
              "last_changed": "2026-07-04T20:59:38.897281+00:00",
              "last_reported": "2026-07-08T23:57:30.143740+00:00",
              "last_updated": "2026-07-08T23:57:30.143740+00:00",
              "context": {
                "id": "01KX22MJMZJ1BJAP02RGQA7MFN",
                "parent_id": null,
                "user_id": null
              }
            },
            "trigger": {
              "id": "0",
              "idx": "0",
              "alias": null,
              "platform": "time_pattern",
              "now": "2026-07-08T16:57:35.143223-07:00",
              "description": "time pattern"
            }
          }
        }
      ],
      "condition/0": [
        {
          "path": "condition/0",
          "timestamp": "2026-07-08T23:57:35.143356+00:00",
          "result": {
            "result": true
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2026-07-08T23:57:35.143493+00:00",
          "changed_variables": {
            "context": {
              "id": "01KX22MQH7GZNFXHKNY8PT3PQV",
              "parent_id": null,
              "user_id": null
            }
          },
          "result": {
            "choice": 2
          }
        }
      ],
      "action/0/choose/0": [
        {
          "path": "action/0/choose/0",
          "timestamp": "2026-07-08T23:57:35.143527+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/0/conditions/0": [
        {
          "path": "action/0/choose/0/conditions/0",
          "timestamp": "2026-07-08T23:57:35.143539+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/0/conditions/0/entity_id/0": [
        {
          "path": "action/0/choose/0/conditions/0/entity_id/0",
          "timestamp": "2026-07-08T23:57:35.143549+00:00",
          "result": {
            "result": false,
            "state": "off",
            "wanted_state": "on"
          }
        }
      ],
      "action/0/choose/1": [
        {
          "path": "action/0/choose/1",
          "timestamp": "2026-07-08T23:57:35.143570+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/1/conditions/0": [
        {
          "path": "action/0/choose/1/conditions/0",
          "timestamp": "2026-07-08T23:57:35.143576+00:00",
          "result": {
            "result": true
          }
        }
      ],
      "action/0/choose/1/conditions/0/entity_id/0": [
        {
          "path": "action/0/choose/1/conditions/0/entity_id/0",
          "timestamp": "2026-07-08T23:57:35.143582+00:00",
          "result": {
            "result": true,
            "state": "off",
            "wanted_state": "off"
          }
        }
      ],
      "action/0/choose/1/conditions/1": [
        {
          "path": "action/0/choose/1/conditions/1",
          "timestamp": "2026-07-08T23:57:35.143592+00:00",
          "result": {
            "result": false
          }
        }
      ],
      "action/0/choose/2": [
        {
          "path": "action/0/choose/2",
          "timestamp": "2026-07-08T23:57:35.143612+00:00",
          "result": {
            "result": true
          }
        }
      ],
      "action/0/choose/2/conditions/0": [
        {
          "path": "action/0/choose/2/conditions/0",
          "timestamp": "2026-07-08T23:57:35.143619+00:00",
          "result": {
            "result": true
          }
        }
      ],
      "action/0/choose/2/conditions/0/entity_id/0": [
        {
          "path": "action/0/choose/2/conditions/0/entity_id/0",
          "timestamp": "2026-07-08T23:57:35.143625+00:00",
          "result": {
            "result": true,
            "state": "off",
            "wanted_state": "off"
          }
        }
      ],
      "action/0/choose/2/sequence/0": [
        {
          "path": "action/0/choose/2/sequence/0",
          "timestamp": "2026-07-08T23:57:35.143670+00:00",
          "result": {
            "params": {
              "domain": "input_boolean",
              "service": "turn_off",
              "service_data": {},
              "target": {
                "entity_id": [
                  "input_boolean.hood_ventilation_control_active"
                ]
              }
            },
            "running_script": false
          }
        }
      ]
    },
    "config": {
      "id": "1783024864428",
      "alias": "Hood ventilation",
      "description": "",
      "triggers": [
        {
          "trigger": "time_pattern",
          "hours": "*",
          "minutes": "*",
          "seconds": "/5"
        }
      ],
      "conditions": [
        {
          "condition": "switch.is_off",
          "target": {
            "entity_id": "input_boolean.cerv_manual_override"
          },
          "options": {
            "behavior": "any",
            "for": "00:00:00"
          }
        }
      ],
      "actions": [
        {
          "choose": [
            {
              "conditions": [
                {
                  "condition": "state",
                  "entity_id": "binary_sensor.e2m_hood_act_pir",
                  "state": [
                    "on"
                  ]
                }
              ],
              "sequence": [
                {
                  "action": "input_boolean.turn_on",
                  "metadata": {},
                  "target": {
                    "entity_id": [
                      "input_boolean.cerv_vent_high",
                      "input_boolean.hood_ventilation_control_active"
                    ]
                  },
                  "data": {}
                },
                {
                  "action": "input_boolean.turn_off",
                  "metadata": {},
                  "target": {
                    "entity_id": [
                      "input_boolean.cerv_vent_medium_request",
                      "input_boolean.cerv_vent_medhigh",
                      "input_boolean.cerv_recirc_high",
                      "input_boolean.cerv_recirc_med",
                      "input_boolean.cerv_recirc_medhigh"
                    ]
                  },
                  "data": {}
                },
                {
                  "if": [
                    {
                      "condition": "switch.is_off",
                      "target": {
                        "entity_id": "input_boolean.bath1_ventilation_request"
                      },
                      "options": {
                        "behavior": "any",
                        "for": "00:00:00"
                      }
                    }
                  ],
                  "then": [
                    {
                      "action": "switch.turn_on",
                      "metadata": {},
                      "target": {
                        "entity_id": "switch.hvac_6ch_relay_output_relay_2"
                      },
                      "data": {}
                    }
                  ]
                },
                {
                  "if": [
                    {
                      "condition": "switch.is_off",
                      "target": {
                        "entity_id": "input_boolean.bath2_ventilation_request"
                      },
                      "options": {
                        "behavior": "any",
                        "for": "00:00:00"
                      }
                    }
                  ],
                  "then": [
                    {
                      "action": "switch.turn_on",
                      "metadata": {},
                      "target": {
                        "entity_id": "switch.hvac_6ch_relay_output_relay_3"
                      },
                      "data": {}
                    }
                  ]
                },
                {
                  "if": [
                    {
                      "condition": "switch.is_off",
                      "target": {
                        "entity_id": "input_boolean.bath3_ventilation_request"
                      },
                      "options": {
                        "behavior": "any",
                        "for": "00:00:00"
                      }
                    }
                  ],
                  "then": [
                    {
                      "action": "switch.turn_on",
                      "metadata": {},
                      "target": {
                        "entity_id": "switch.hvac_6ch_relay_output_relay_4"
                      },
                      "data": {}
                    }
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "condition": "state",
                  "entity_id": "binary_sensor.e2m_hood_act_pir",
                  "state": [
                    "off"
                  ]
                },
                {
                  "condition": "switch.is_off",
                  "target": {
                    "entity_id": "input_boolean.dehu_control_active"
                  },
                  "options": {
                    "behavior": "any",
                    "for": "00:00:00"
                  }
                },
                {
                  "condition": "switch.is_off",
                  "target": {
                    "entity_id": "input_boolean.bathroom_ventilation_control_active"
                  },
                  "options": {
                    "behavior": "any",
                    "for": "00:00:00"
                  }
                }
              ],
              "sequence": [
                {
                  "action": "switch.turn_off",
                  "metadata": {},
                  "target": {
                    "entity_id": [
                      "switch.hvac_6ch_relay_output_relay_2",
                      "switch.hvac_6ch_relay_output_relay_3",
                      "switch.hvac_6ch_relay_output_relay_4"
                    ]
                  },
                  "data": {}
                },
                {
                  "action": "input_boolean.turn_off",
                  "metadata": {},
                  "target": {
                    "entity_id": [
                      "input_boolean.cerv_vent_high"
                    ]
                  },
                  "data": {}
                }
              ]
            },
            {
              "conditions": [
                {
                  "condition": "state",
                  "entity_id": "binary_sensor.e2m_hood_act_pir",
                  "state": [
                    "off"
                  ]
                }
              ],
              "sequence": [
                {
                  "action": "input_boolean.turn_off",
                  "metadata": {},
                  "target": {
                    "entity_id": "input_boolean.hood_ventilation_control_active"
                  },
                  "data": {}
                }
              ]
            }
          ]
        }
      ],
      "mode": "single"
    },
    "blueprint_inputs": null,
    "context": {
      "id": "01KX22MQH7GZNFXHKNY8PT3PQV",
      "parent_id": null,
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Hood ventilation",
      "message": "triggered by time pattern",
      "source": "time pattern",
      "entity_id": "automation.hood_ventilation",
      "context_id": "01KX22MQH7GZNFXHKNY8PT3PQV",
      "domain": "automation",
      "when": 1783555055.1434052
    }
  ]
}
alias: Hood ventilation
description: ""
triggers:
  - trigger: time_pattern
    hours: "*"
    minutes: "*"
    seconds: /5
conditions:
  - condition: switch.is_off
    target:
      entity_id: input_boolean.cerv_manual_override
    options:
      behavior: any
      for: "00:00:00"
actions:
  - choose:
      - conditions:
          - condition: state
            entity_id: binary_sensor.e2m_hood_act_pir
            state:
              - "on"
        sequence:
          - action: input_boolean.turn_on
            metadata: {}
            target:
              entity_id:
                - input_boolean.cerv_vent_high
                - input_boolean.hood_ventilation_control_active
            data: {}
          - action: input_boolean.turn_off
            metadata: {}
            target:
              entity_id:
                - input_boolean.cerv_vent_medium_request
                - input_boolean.cerv_vent_medhigh
                - input_boolean.cerv_recirc_high
                - input_boolean.cerv_recirc_med
                - input_boolean.cerv_recirc_medhigh
            data: {}
          - if:
              - condition: switch.is_off
                target:
                  entity_id: input_boolean.bath1_ventilation_request
                options:
                  behavior: any
                  for: "00:00:00"
            then:
              - action: switch.turn_on
                metadata: {}
                target:
                  entity_id: switch.hvac_6ch_relay_output_relay_2
                data: {}
          - if:
              - condition: switch.is_off
                target:
                  entity_id: input_boolean.bath2_ventilation_request
                options:
                  behavior: any
                  for: "00:00:00"
            then:
              - action: switch.turn_on
                metadata: {}
                target:
                  entity_id: switch.hvac_6ch_relay_output_relay_3
                data: {}
          - if:
              - condition: switch.is_off
                target:
                  entity_id: input_boolean.bath3_ventilation_request
                options:
                  behavior: any
                  for: "00:00:00"
            then:
              - action: switch.turn_on
                metadata: {}
                target:
                  entity_id: switch.hvac_6ch_relay_output_relay_4
                data: {}
      - conditions:
          - condition: state
            entity_id: binary_sensor.e2m_hood_act_pir
            state:
              - "off"
          - condition: switch.is_off
            target:
              entity_id: input_boolean.dehu_control_active
            options:
              behavior: any
              for: "00:00:00"
          - condition: switch.is_off
            target:
              entity_id: input_boolean.bathroom_ventilation_control_active
            options:
              behavior: any
              for: "00:00:00"
        sequence:
          - action: switch.turn_off
            metadata: {}
            target:
              entity_id:
                - switch.hvac_6ch_relay_output_relay_2
                - switch.hvac_6ch_relay_output_relay_3
                - switch.hvac_6ch_relay_output_relay_4
            data: {}
          - action: input_boolean.turn_off
            metadata: {}
            target:
              entity_id:
                - input_boolean.cerv_vent_high
            data: {}
      - conditions:
          - condition: state
            entity_id: binary_sensor.e2m_hood_act_pir
            state:
              - "off"
        sequence:
          - action: input_boolean.turn_off
            metadata: {}
            target:
              entity_id: input_boolean.hood_ventilation_control_active
            data: {}
mode: single

Where did you get the condition “switch is off”?

And even if it exists why would it work for an entity that is not a switch?

An input boolean is not a switch. Even though it looks like one.

Use a state condition:

Finally polling for a change every 5 minutes is a terrible way to trigger an automation. Just use state triggers that fire whenever the entities change.

It looks like the automation might have been generated by an LLM.

:roll_eyes:

It was made entirely in the UI. I don’t use handwritten yaml (because i just don’t care enough to learn the idiosyncrasies of yet another proprietary configuration language) and i didn’t use an LLM because the UI is right there. I used a switch because apparently that’s what the UI uses when you select a “change an input boolean” action from the menu, or use an input boolean in a condition. Take it up with whoever wrote it.

A polling state machine is a perfectly reasonable way to make robust automations and i don’t feel the need to defend it as a method. Automating on edges leads to all kinds of unexpected behaviors when edges are missed, and that requires error handling which defeats the purpose.

All that aside, the “turn off an input boolean” action is broken.

No it isn’t. It is incredibly inefficient compared to only triggering when the state of the entities change.

Nope. It works perfectly for everyone else.

However I no longer care enough to convince you.

Good luck.

And this is the crux of the problem.

Without that frankly nobody will trust when you say.

Especially when adding

In HA it is in fact, not the correct patter.. Indeed it is the opposite of a correct pattern it also opens up potential for unchecked loops and post wait states. (you should avoid lengthy wait conditions and polling loops if at all possible, you’re doing a wait inside a loop. )

So when folks who have been around years and know of common failures. Point them out. Maybe more listen less argument is in order?

In OP’s defense, the condition does exist, it’s one of the new “purpose specific” conditions. And, it does support entities in the input_boolean domain as well as switch… or, at least, it’s supposed to. In my limited testing, I haven’t had any issues with it for either entity type.

While I am seeing the UI bug described in this and the other thread OP commented on, I’m not able to recreate the other behaviors being described.

Cool, thanks everybody.

And this is the crux of the problem.

Why? Because I use the UI? Am I not allowed to have things work when I use the UI? Do users only matter if they spend all day yeeting inscrutable garbage into a terminal window with sweet custom text colors?

you’re doing a wait inside a loop.

I’m not doing an anything. The folks who wrote the code are doing something.

I built a very simple automation by clicking things in the UI, and using allowed syntax and allowed methods. It should have a very predictable behavior (regardless of whether it fits your personal aesthetic) but in real life it doesn’t actually work, leading to unexpected behaviors and leaving an output in an unexpected, and actively reversed, state.

Either the bug is “home assistant UI shouldn’t allow this to be built” or there is a bug in how HA handles these actions. Given that “checking something occasionally and doing tasks” is basically SOP for every computer ever built I’m inclined to believe it’s the latter. But hey, if you prefer to jump down my throat about having a computer do computer things then that’s fine too. I did mention that I’ve found HA communities to be pretty hostile, so it’s no surprise to me.

I’m not here tk argue that. It’s not asthetic. It’s well documented that waits and loops are bad because fundamentally HA is a statr engine based on triggers. Which fundamentally has some construction issues when long running loops and repeating polls are run and the community does a pretty good job of helping people understand why that trigger /5 there is fundamentally bad, there’s better ways.

My point was starting any conversation with ‘and I’m not willing to learn’ will earn you about that much help or understanding from the folks who MIGHT have been interested in helping.

Should that switch call be doing that. Prob not but coming at it with I can do no wrong and km not willing to learn isn’t earning any fans, man.

Create an example input boolean
Settings–>Devices & Services–>Helpers–>(+Create helper)–>Toggle–>[enter in Name*]example_input_boolean–>(Create)
Create an example script to show switch.is_off .
Settings–>Automations & Scenes–>Scripts–>(+Create script)–>Create new script–>(+ Add action)–>Blocks–>If-then–>(+Add condition)–>Helpers–>Input boolean–>example_input_boolean–>Switch is off–>(Vertical dots to the right of New script)–>Edit in YAML
Resultant YAML

sequence:
  - if:
      - condition: switch.is_off
        target:
          entity_id: input_boolean.example_input_boolean
        options:
          behavior: any
          for: "00:00:00"
    then: []

The third line shows is_off

Something is definitely broken. This automation should be turning the ‘kitchen damper’ output to ON, is actually turning the output to OFF. The other outputs in the same action, being handled the same way, are behaving correctly. This automation was behaving correctly for a week or two before this behavior started.

I confirmed that the incorrect state is reflected in the actual hardware, not just in the UI.

Will upload traces and yaml and whatnot tomorrow when I’ve got a laptop available.


Can’t upload the trace I captured because there is a character limit.

If it’s too long for the forums, post it to a gist or dpaste.

Neat, didn’t know about gist.