-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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 switch entity for Shelly scripts #108171
Add switch entity for Shelly scripts #108171
Conversation
Hey there @balloob, @bieniu, @thecode, @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
This comment was marked as resolved.
This comment was marked as resolved.
About the switch, seems a good idea. Only concern I have is that a user can stop the script for BLE proxy and a restart of the device/HA will enable it as it's auto restarted upon connection. Maybe we can have a binary_sensor and a button to toggle the status. |
I think, adding disabled by default switches, makes a lot of sense here. I wouldn’t worry too much about them turning off the Bluetooth script as they can also do that on the device, and if they want to break it, that’s up to them to do. |
I would say, let's complete #106985 first, and then rework this to be a switch then. |
Putting this to draft as rework is supposed to be done 👍 |
This comment was marked as outdated.
This comment was marked as outdated.
avoid stale, waiting for rework |
deb1cf7
to
ec1d473
Compare
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
ec1d473
to
3b212ed
Compare
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.
I think Script.Start
and Script.Stop
methods should be used.
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.
Looks good, works as intended. Thanks @chemelli74 👍
Breaking change
Proposed change
Add switch entity to control all scripts running on a Shelly device (gen2)
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: