-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow to use HA Scripts as Button Entity #20
Conversation
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.
Thank you for your contribution! The script support is working fine 👍
Please fix the cosmetic formatting issues reported by cargo fmt
, then I will merge this PR.
You can ignore the reported issue by Clippy, I've fixed that on the main branch.
The only thing we could discuss is to use a switch instead of a button for HA scripts. This would allow to:
- stop a running script (at least according to the HA docs. I don't know if the script will be killed, or if it needs specific support to be stoppable).
- see when a (long running) script is active on the remote.
For me personally it doesn't really matter right now. I still have to migrate everything to HA and I'm not using scripts yet (just a matter of time...).
188c9b4
to
616043e
Compare
thanks for reviewing it. Fmt errors are fixed, still new to Rust, that was my first code in rust ever ;) I actually never had the need to stop a running scripts, mine are quite short. So for me, a button is enough. Yes, HA allows to stop a running script, there is a |
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.
Thanks again! I'll merge it, button entitiy it is 👍
You haven't picked the easiest Rust project to start with ;-)
Also some of my "earlier" work and a bit complicated with the Actor stuff.
A quick question on this one now that it has been released... How do I pass parameters to the script that needs to be called? I can't seem to find that in the Web Configurator. |
That is currently not possible. Since this PR is merged, let's continue in #20 |
No description provided.