esphome / esphome/feature-requests

Add transition_length in servo.write

Open
#1,246 3 comments 3 reactions 0 assignees View on GitHub
component: servo enhancement
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**

It would be nice if we could set the transition_length parameter in the servo.write action.
We could have the ability to have different rotation speed in different cases.

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

For example:
```
api:
services:
- service: control
variables:
level: float
transition_lenght: string
then:
- servo.write:
id: my_servo1
level: !lambda 'return (-2*(level/255))+1;'
transition_lenght: !lambda 'return transition_lenght;'

switch:
- platform: template
name: boule_ch2
restore_state: true
optimistic: true

turn_on_action:
- servo.write:
id: my_servo1
level: -1
transition_length: "00:00:10"

turn_off_action:
- servo.write:
id: my_servo1
level: 1
transition_length: "00:00:40"
```
**Additional context**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the servo.write action entry point and the configuration path for transition_length. Use the YAML examples in the request as the acceptance cases: different fixed durations should be usable for separate actions, and the value should support the shown templated service use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
embedded-iot
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.