esphome / esphome/feature-requests

Set stepper position (without moving)

Open
#943 2 comments 0 reactions 0 assignees View on GitHub
Type: Robotics
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

I would like to be able to set the stepper position to a value. This could make homing, troubleshooting and toggling the position of a cover much easier.

**Please describe your use case for this integration and alternatives you've tried:**

I tried to use stepper.report_position, but that moved my stepper to the location desired to be reported.

**Additional context**

Sometimes my curtain hangs behind something, which causes it to be unable to move. The stepper tries to obtain that location anyway, so it skips steps until it reaches that location. The problem is however, that it did not get to that location, so the next time your cover is opened/closed, it goes the entire wrong way. I want a method to set the position of the stepper after such the cover did not move.

The following snippet should toggle the location of the stepper after it hung, but currently does not work with stepper.report_position.
```
- service: toggle_current_position
then:
- stepper.report_position:
id: ${plug_id}_stepper
position: !lambda |-
if (id(${plug_id}_cover).position == id(closed_position)) {
return 0;
} else {
return id(closed_position);
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the requested stepper.report_position behavior and the YAML service example in the issue. No implementation files, entry points, or tests are identified, so determine where stepper position reporting is implemented and define how setting a position without movement should be tested and exposed.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.