Automation with input_boolean help?

Hey folks,

I’ve got an automation that looks like so:

  • alias: Morning Lights downstairs
    trigger:
    platform: time
    after: ‘05:15:00’
    condition:
    condition: and
    conditions:
    - condition: state
    entity_id: group.parent_devices
    state: ‘home’
    - condition: state
    entity_id: input_boolean.disable_wakeup
    state: ‘off’
    action:
    service: homeassistant.turn_on
    entity_id:
    - switch.basement

and an input_boolean configured like so:

input_boolean:
disable_wakekup:
name: Disable Basement Wake-up Light
initial: off
icon: mdi:lightbulb

I’m using the 'home" state for those devices in multiple other automations, so I suspect that’s not the issue. Regardless of the state of that input boolean, if its state is included as a condition in the automation, it never fires.

I gotta believe I’m missing something simple. Help?

Formatting your code properly will help other members debug your issue.

Highlight your code and then press the Preformatted Text button on the post form as shown in the image below

Sorry about that:

- alias: Morning Lights downstairs
   trigger:
       platform: time
       after: '05:15:00'
   condition:
       condition: or
       conditions:
         - condition: state
           entity_id: group.parent_devices
           state: 'home'
         - condition: state
           entity_id: input_boolean.disable_wakeup
           state: 'off'
   action:
       service: homeassistant.turn_on
       entity_id: 
        - switch.basement

and

input_boolean:
  disable_wakekup:
    name: Disable Basement Wake-up Light
    initial: off 
    icon: mdi:lightbulb

Nothing to apologize for - most new posters aren’t aware of how that works and that’s why I made the image.

One thing to check - go to your dev states panel and make sure that the state of the input boolean is actually ‘off’ and not ‘Off’. Case makes a difference.

head down on desk

Note: disable_wakekup is NOT the same as disable_wakeup

I suspect the problem I was having was related to terrible typing. I’ll update this post either way.

3 Likes

Again, this is a mistake we have all made here. Just part of the experience… :smiley:

I had mentioned the case because I had the same issue and someone pointed it out to me.

1 Like

Proofreading is important. Once I had the correct name of the input_boolean in the condition, everything worked as expected.

I’m a little surprised there’s no error in the HASS log about an invalid item in the automation.yaml though.

HA errors aren’t always the most descriptive. I once had HA not start up because I copied and pasted a script with a degree symbol in it. No error log at all. Turned out it couldn’t start because the degree symbol was not in UTF-8 format but no error message to that effect except from systemctl. After I figured it out which file it was and corrected it, I posted a error and it was addressed.

But this is a heads up to people that copy and paste example scripts - make sure the editor you use can specifically save files in UTF-8 format.