Can I track stepper motor position with Endstop Cover?

I’m working on an window opener that uses a stepper motor linear actuator. At both ends of the linear actuator is an endstop.

It would seem that using the Endstop Cover component is the obvious answer. However, I am using a stepper motor and the TMC2209 stepper motor component for ESPHome. Right now, the Template cover works perfectly for tracking the position of the motor. However, the Template Cover does not allow using endstops.

The problem with Endstop Cover is that it’s time based and doesn’t count steps like I can do with a Lambda in the Template Cover component. I would really like to count steps and not use time because I don’t want to be figuring out how long it takes to move each time I change the speed of the motor.

Is it possible to track steps and not time with the Endstop Cover component?

This is why its so important to actually look through and read the documentation for what components you’re actually using! This is all covered and explained in the Esphome documentation for Stepper

Thats all done for you automatically and explained in the Docs and doesnt require any “figuring out” or at least if any is required it will be very minimal and very basic arithmetic.

A stepper motor and a linear actuator are 2 different things. Are you using some kind of ball screw?? Post a link or picture of whatever it is you’re using please.

Also, its really hard to effectively help you if you dont provide your actual details like the hardware, links to view the hardware, your current Esphome configuration, etc. You mention that your actuator has 2 endstops built-in(which is standard) but you didnt mention if you have access to them as in are they included with the devices wiring ouput so that you could read the state of the endstops as sensors?

Not directly. You could probably adjust the duration on lambda every time you set different speed.
id(my_cover).set_open_duration(value); //make your math to convert stepper speed to duration

But since you have template cover already, it’s likely easier to add the endstops there. It’s a template at the end…