Automate cover using Node-Red


I’m starting out with Node-Red for automating a few things around the house. I’d like to have an automation so that a cover’s position is set to 80% when its position is greater than 80% and I open the door. After a minute or when the door is closed, I want to restore the previous position of the cover. This will make it easier to let the cat out when the cover is down. I thought this would be an easy scenario to get me started with Node-Red but that isn’t the case. Any help would be greatly appreciated.

Kind regars,

You just have to store the previous state using a set flow.some_internal_value and get it back after 1min.

What part block you?

Thanks for your reply. My first problem is: how do I get the current position of the blinds. I think I need a “current state” node for this. I can see there’s a current_position in the attributes, but how do I get the node to use that value?

See chapter ’ Using context in a flow’ to save the value.
To get the value use a node ‘ha current state’ with your ha cover information.

Also those example might help you:

Thanks for the extra info and sory for the late reply.

I was under the impression that a “current state” node could stop a message, but I guess it just adds info to a message, so I can stop the flow later on with a switch node. I’l get there, step by step.

Kind regards,