Automation doesn't work in the newest version

So, my home assistant crashed about a weekk ago. SD card is broken, so i bought a new one and installed Home Assistant on my Pi (3B+).

I installed the deconz add-on and integration, all worked well. I have linked all my lights, switches and sensors, they do work.

Yet, my automations don’t trigger. When I execute the automation manually, it works, but automatically, it doesn’t… What is wrong here in my automation? Is the trigger wrong?

- id: '1600893813321'
  alias: Gangkast dicht
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.trapkast_sensor
    to: Closed
  condition: []
  action:
  - service: light.turn_off
    entity_id: light.gangkast
  mode: single
  max: 10

Jeez… nevermind. I had to wait till all the entities were available as device, and then i could select device in the automation trigger and action.

Anyone knows why the example above won’t work? It seems to do the same thing…

Don’t know if it matters with yaml, but use lower case for Closed. I don’t have any devices that uses the state Closed. Shouldn’t be in the present tense close?

I will test the lowercase.

It would be weird to use “close” though, because it’s a state. The state is either “closed” or “open”. Close is an action in itself and not a state.

But who knows… :smiley: Thanks for you response! Will try it out.