Automation fails to check condition

Hi,

I have a simple script that fails to check the condition @ HA 2021.3.

  1. the “input_boolean.hobbykamer_pc_aan” is set to ON (checked with developer tools)
input_boolean.hobbykamer_pc_aan 	on 	
editable: true
friendly_name: Hobbykamer pc aan
icon: mdi:monitor
  1. The automation is executed at the correct time

  2. the automation does not check the “input_boolean.hobbykamer_pc_aan”, it always opens the covers.

  3. it drives me crazy … what’s the missing link?

- id: '1614932641904'
  alias: Hobby open op timer
  description: ''
  trigger:
  - platform: time
    at: input_datetime.boven_alles_open
  condition:
  - condition: state
    entity_id: input_boolean.hobbykamer_pc_aan
    state: 'off'
  action:
  - service: cover.open_cover
    target:
      entity_id: cover.bo_hobby_jaloezie
  mode: single

When you tested it, did you wait for the automation to trigger by itself whrn at the time defined in the input_datetime or did you execute it manually?

Hi,

I set the time using “input_datetime.boven_alles_open” and then let HA executed the automation.

  1. adjusted automation
  2. set time (current time +5 minutes)
  3. Waited for HA to execute

Is the state for the input_boolean ‘on’ under Developer Tools -> States? Can you maybe post a screenshot?

Screenshot: it seems ok

Just ruling stuff out, but are you certain that it’s this automation that has fired and opened the blinds?

Yes, disabled all others … this is the one.

ha error 2

update to 2021.3.2 : same results

And you have reloaded the automation since making the ‘adjustments’ you mention in your second post?

Do you need an s at the end of condition: as there is a list underneath?

No, he doesn’t, the automation keyword is condition (singular), as is trigger and action.

conditions: is only required for condition types that accept multiple conditions (e.g. and, or, not, maybe others).

I’m out of ideas, the code looks perfectly fine. And the trigger and action part work according to your testing.

1 Like

I rebooted multiple times, just to be sure. But it keeps ignoring the condition. I don’t see why this automation fails.

I will try a NOT statement

As an experiment, try using a different type of condition. It should not make a difference but let’s see how it behaves.

- id: '1614932641904'
  alias: Hobby open op timer
  description: ''
  trigger:
  - platform: time
    at: input_datetime.boven_alles_open
  condition:
  - condition: template
    value_template: "{{ is_state('input_boolean.hobbykamer_pc_aan', 'off') }}"
  action:
  - service: cover.open_cover
    target:
      entity_id: cover.bo_hobby_jaloezie
  mode: single
1 Like

Hello,

I remove the old automation and use the template. The automation worked 100%, so there seems to be an issue with the state & reading booleans

  condition:
  - condition: state
    entity_id: input_boolean.hobbykamer_pc_aan
    state: 'off'