Troubleshooting why door is closing all the way when using set_cover_position

I’m unsure why this is happening, but maybe i need a different service. If all 3 garage doors are closed, it does what i expect, opens each one to the percentage in the variable position.

If one door is already open, it closes that one completely, and the other 2 to the percentage. I was more hoping for it would close it to that percentage so they would all be in sync.

let position = flow.get("garagedoors")

//Function to create msg for call service
function Doors(door) {
  // Craft Service Call message
  msg.payload = {
    domain: "cover",
    service: "set_cover_position", // Integer from slider
    target: {
      entity_id: [`cover.garage_door_${door}_door`],
    },
    data: {
      position: position
    }
  };
  node.send(msg); //Send the data
}

// Loop through all 3 doors
for (let i = 1; i < 4; i++) {
    // Check if it's the first door
    if (i === 1) {
        // Call the function for the first time with no delay
        Doors(i);
    } else {
       let delay = i * 5000; // 5s delay for each subsequent event (i would be >= 1)
       setTimeout(function() {Doors(i);}, delay); 
    }
}

Can you do the operations with manual calls?
If not, then your hardware is lacking.
If you can, then you code is lacking.

1 Like

You’ll have to forgive me a bit. When you say manual call, do you mean to go into developer tools and set up an action?

Testing like this:
Starting state:
Garage Door 1,3 open to 30%
Garage Door 2 fully open

Perform action

Resulting State:
Garage Door 1,3 open to 50%
Garage Door 2 fully closed

Yes, exactly that.
Some door systems can only do percentage setting from fixed positions.

Okay! I had no idea. Apparently the Ratgdo or my door (or the combo) are like that.

I tested one last time using the slider in HA on a fully opened door, and it just closed. Hardware it is.

I guess I need to edit the code to just ignore doors that are fully open.

Thanks very much!