New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for parameters in scripts #3538
Conversation
e450183
to
0e9d168
Compare
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
0da8050
to
7ca8b3b
Compare
Nice, striking this one from my personal TODO list 😄 |
Great! |
ping @OttoWinter @jesserockz |
@jimtng how could I test this in my addon version of ESPHome? Trying with: external_components:
- source: github://pr#3538
components:
- script fails with
|
@nagyrobi you'd need to check out my branch in order to test. This PR contains changes to esphome/const.py which is not a part of the |
For that reason, it's not a bad idea to keep new constants in your component, at least during development. That makes it possible to handle it as an external component. |
For my use case I was offered a nice workaround, so I don't need to test anymore: esphome/feature-requests#241 (comment) |
@jesserockz WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor change request. Otherwise looks good, and tested locally
I actually pushed some commits that "fix" having lists in the types. The docs mentioned Also fixed the "crash" when parameters were not set on the execute action, this is a limitation of not being able to raise cv.Invalid inside |
What does this implement/fix?
Add support for parameters in scripts
Types of changes
Related issue or feature (if applicable): fixes esphome/feature-requests#241
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2120
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: