Creating automation that triggers Ikea blinds

I’m trying to create atomation that would trigger Ikea blinds to go down if lights get turned on.
I have a problem, that I can get to the very end, but am then unable to set the action for the blinds.

Blinds automation

If I switch to editing in YAML, then I don’t know how to configure the position. If I replace the ‘type: set_position’ entry with "position: 100’ I get the ‘Message malformed: extra keys not allowed @ data[‘position’]’ error. And if I want to add 100 after the ‘set_position’ then I get the ‘Message malformed: value is not allowed for dictionary value @ data[‘type’]’ error.

device_id: <idstring>
domain: cover
entity_id: cover.tradfri_blind
type: set_position


You’ve got an extra single quote after position: 100’

I fought with the GUI editor and lost, so ended up trying some yaml for the first time. I added this to my automations.yaml and oddly enough it worked (at least when I execute the automation manually, I won’t know about complete success until sunset):

- id: '1591660199360'
  alias: Close Robot Blind
  description: ''
  - event: sunset
    platform: sun
  condition: []
  - service: cover.close_cover
    entity_id: cover.tradfri_blind

I should note that the closed position has already been set using the buttons on the blind.

Thanks a lot. I’ll give this one a go and see what it does for me :slight_smile:
I already defined max length with buttons as well, so that should not be an issue with me either.