I have quite a few Input Boolean switches with automations attached to them for when they’re switched on or off.
In the past they’ve all worked fine, but they all stopped working a few weeks ago. I run Home Assistant via Docker which automatically updates itself, so I wondered if there was a breaking change in a recent update that’s stopped them working. I’ve looked through the release notes but couldn’t find anything.
Here’s some typical automations that used to work fine, but no longer work
input_boolean:
living_room_late_evening:
name: 'Late Evening'
icon: mdi:weather-night
automation:
- alias: 'Living Room Late Evening on'
trigger:
- platform: state
entity_id: input_boolean.late_evening
to: 'on'
action:
- service: scene.turn_on
entity_id: scene.living_room_lights_on
- alias: 'Living Room Late Evening off'
trigger:
- platform: state
entity_id: input_boolean.living_room_late_evening
to: 'off'
action:
- service: scene.turn_on
entity_id: scene.living_room_lights_off
Have you determined whether it’s the trigger or the action that doesn’t work? E.g., have you tried to manually trigger the automations to see if the action works? And when you change the input_boolean, have you looked in the log to see if the automation was triggered (or looked at the last_triggered attribute of the automation)?
I don’t know if it will help or not, but I put a post up last week about troubles I was having with Google Calendar based lights using input_boolean’s. I ended up resolving it my self, but it might help to compare your setup to what I have done.
I’m guessing you are running into an issue when the input boolean is on, and the automation is sending an ‘on’ to the input boolean. At that point in time, nothing will happen due to the fact that HA suppresses 'turn_on’s for input booeans when the input boolean is on.
Swap your input booleans for template switches that reference an input boolean and everything should work at all times. It’s sounds stupid but it will always fire offs and on’s regardless of the switches state.
Next hide the input_boolean from your interface and only use the switch. The input boolean will still store the on/off state of your scene. The switch will behave like a normal switch where the state comes from the input boolean, and the on’s/off’s aren’t suppressed based on the state.