esphome / esphome/feature-requests
Add await for Script Execution
- 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**
Most of my scripts have delays, so when I call `script.execute`, I immediately follow it up with `script.wait`.
```
- script.execute: move_servo_to_position
- script.wait: move_servo_to_position
```
I'm calling 10+ scripts, so this quickly gets noisy.
**Please describe your use case for this integration and alternatives you've tried:**
This reminds me of JavaScript. When you call an async function you can either `await` it, making the code synchronous; or you can not `await`, making it asynchronous.
I would like a `script.await_execute` or something along those lines.
Currently I'm just calling `script.wait` after all `script.execute`'s.
**Additional context**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the issue's current script.execute and script.wait usage and compare it with the requested script.await_execute behavior. No files, tests, or implementation entry points are mentioned; done would mean defining and implementing the awaited execution behavior so repeated script.wait calls are no longer needed.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100