Creating new script to open and close IKEA blinds

Hey guys, I’m relatively new to Home Assistant so I’m not sure what I’m doing wrong. I bought some IKEA blinds to open and close depending on the time of day. I configured them using my Zigbee device. I am trying to create a script to open and close my 3 blinds in the living room. Basically, I want one to start opening up, wait 5 seconds, another blind to start opening up, wait another 5 seconds, then the last blind to start opening up. For whatever reason, the first blind opens up fine, waits five seconds, then the next one starts opening up. However, the third blind never opens up and I have no idea why. I tried multiple ideas but none of them worked. This is the yaml file that was created when I added the actions using the visual editor.

If anyone could help me with this problem I would greatly appreciate it!

Please copy and paste your code to the forum (and correctly format it) rather than posting screenshots.

See here.

:+1:

In addition, please complete the code by which you call the script.
And since Ikea devices often have a life of their own: Have you checked if that third roller blind is working?

Yeah sure! Here’s my code:

alias: Living Room Blinds Up
sequence:
  - device_id: 2706900325fbf6be3e9142e6fc382262
    domain: cover
    entity_id: cover.left_living_room_blind_window_covering
    type: set_position
    position: 100
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - device_id: be9842f1d32fa9bb1cc593aa819ea38d
    domain: cover
    entity_id: cover.middle_living_room_blind_window_covering
    type: set_position
    position: 100
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - device_id: d4a98cbeb2cc09187fb1041aec2a1f17
    domain: cover
    entity_id: cover.right_living_room_blind_window_covering
    type: set_position
    position: 100
mode: single
max: 10
icon: 'prefix:living_room_blinds_up'

And I don’t have any code that calls my script yet. I just run the script manually. Once I get this working, I’m going to automate the script to run when the sun rises. And yeah, the third blind definitely works. When I run this script without any delays in it, all three blinds go up at the same time, but I was trying to get them to go up at different intervals, but it’s kind of sounding like it might be a problem with the blinds.

I would give the third cover its 5sec, too, and see what happens.

The delays are after an action, so this would simply cause a 5 second delay before HA considers the script run task ‘finished’.

@tylermoore19 have you 100% confirmed there is not a typo in the entity_id or device_id? Perhaps swap the first and last devices in the script.

Also, this is just my personal preference as I think it makes things neater, you can change the delay time format to delay: '00:00:05' which saves a heap of lines.

So I tried adding a 5 second delay at the end of the script and same thing, still wasn’t working. I double checked my entity_id’s and those are correct too. I didn’t even manually type those in because I created the script through the UI so it gave me a drop down menu with all the available devices I could use. But I did notice something weird. I was playing around with it and tried this script out:

alias: Living Room Blinds Up
sequence:
  - device_id: 2706900325fbf6be3e9142e6fc382262
    domain: cover
    entity_id: cover.left_living_room_blind_window_covering
    type: set_position
    position: 100
  - delay: '00:00:03'
  - device_id: be9842f1d32fa9bb1cc593aa819ea38d
    domain: cover
    entity_id: cover.middle_living_room_blind_window_covering
    type: set_position
    position: 100
  - device_id: d4a98cbeb2cc09187fb1041aec2a1f17
    domain: cover
    entity_id: cover.right_living_room_blind_window_covering
    type: set_position
    position: 100
  - delay: '00:00:03'
mode: single
max: 10
icon: 'prefix:living_room_blinds_up'

So I made the delays 3 seconds and I took out the middle delay, so I only had one after the first blind, and then after the third blind. The first blind went up normally, 3 second delay, then the middle blind started going up, and then about 6 or 7 seconds later, the third blind started going up. It kind of feels like the delay was doubled for the third blind, which is weird because I don’t even have a delay between the second and third blinds.

True. But with Ikea everything is possible :wink:

Have you tried to just call the open command rather than set position?

My Automation looks like this (I only have 2 but there is always 5 seconds delay between them)

- id: fyrturloungesun002
  alias: Open Blinds at Sunrise
  trigger:
    platform: sun
    event: sunrise
    offset: -00:15:00
  action:
  - service: cover.open_cover
    entity_id: cover.fyrtur_lounge_rear
  - delay:
      seconds: 5
  - service: cover.open_cover
    entity_id: cover.fyrtur_lounge_front

Simon

Yeah when I’m just using two blinds, the delay works just fine, but for some reason, when I add that third one in there, it doesn’t work correctly. I tried your approach of just calling the open service and that isn’t working either. I decided I’m just going to have all three blinds open at the same time because this is not worth the hassle to have 5 seconds delay in-between each window. Thanks everyone for trying to help!