Weather automation doesnt work - why? Simple for experienced people!

Hey there guys,

i am writing my first automation.
It should close my covers at the window when its warmer than 20 degrees C and the weather is cloudy.
I am using the standard weather entities from HA.

Heres the config:

  - alias: 'Rollos runter'
    initial_state: on
    trigger:
      - platform: numeric_state
        entity_id: weather.home
        value_template: "{{ state.weather.home.temperature }}"
        above: 20
    condition:
      condition: or
      conditions:
         - condition: state
           entity_id: weather.home
           state: 'partlycloudy'
         - condition: state
           entity_id: weather.home
           state: 'partlycloudy'
    action:
      - service: cover.open_cover
        data:
          entity_id: cover.17000681bcddc2b0d390

HA ERROR says:

Error loading /config/configuration.yaml: while scanning for the next token
found character '\t' that cannot start any token
  in "/config/automations.yaml", line 14, column 3

The condition is wrong. But I dont get it…

You’ve used a tab character instead of a space.

1 Like

There may be other issues, but that error is saying you have a tab character in configuration.yaml. You should set your editor to replace tabs with spaces.

Thanks!
The Tab was the problem…
Was using the vim editor with an ssh tunnel…
Thanks!!!

Are you sure this is correct:

        value_template: "{{ state.weather.home.temperature }}"

That doesn’t look right.

EDIT: Also you have the same condition twice.