Need some help: input_boolean triggering blinds automation

Hello,

i am quite a newbie in automations of homeassisstant. But sure someone can help me.

I added an input_boolean in my configuration.yaml successfully by this code:

input_boolean:
  auto_jalousien:
    name: Automatik
    icon: mdi:auto-fix

The automation should trigger only when the above input_boolean is true and a at specific time (here 09:00 AM).
Checking the syntax (hass --script check_config) throws errors.

- alias: automatic_close
  trigger:
    platform: state
    entity_id: input_boolean.auto_jalousien
    state: 'on'
  condition:
    - condition: time
      after: '09:00:00'
  action: homeassistant.turn_on
  entity_id:
    - switch.grosse_jalousie
    - switch.kleine_jalousie

Sure i am only doing something stupid wrong.

Thanks in advance for your help!

Regards, Ralf

I think you answered your own question by the way you asked the question.

The automation should trigger at a specific time - 9am

It should only trigger (condition) if the input_boolean is true.

The trigger and condition in the code you posted are the wrong way round :slight_smile:

1 Like

Sorry for the late answer…

First, Thanks for making me aware of this. I now changed it to look this:

  • alias: automatik_jalousien_schliessen
    trigger:
    platform: time
    hours: 9
    minutes: 0
    seconds: 0
    condition:
    • condition: state
      entity_id: input_boolean.auto_jalousien
      state: true
      action:
      -servcie: homeassistant.turn_on
      entity_id:
      • switch.grosse_jalousie
      • switch.kleine_jalousie

But a script check give me this error i cannot interpret myself:General Errors:
- Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here
in “/home/homeassistant/.homeassistant/automations.yaml”, line 26, column 15

What does “mapping values” mean?

Thanks for any hints in advance,
Ralf

I think you want something like this:

- alias: automatik_jalousien_schliessen
  trigger:
    platform: time
    at: '09:00:00'
  condition:
    condition: state
    entity_id: input_boolean.auto_jalousien
    state: 'on'
  action:
    service: homeassistant.turn_on
    entity_id:
      - switch.grosse_jalousie
      - switch.kleine_jalousie

Thanks very much for your help!
Now it works!

/ Ralf

1 Like