-
-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
base: dev
Are you sure you want to change the base?
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
"script": RpcSwitchDescription( | ||
key="script", | ||
sub_key="running", | ||
entity_category=EntityCategory.DIAGNOSTIC, |
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.
Commenting so it is not accidently merged, as we discussed without changes entity_category
doesn't work in this implementation.
"switch": RpcSwitchDescription( | ||
key="switch", | ||
sub_key="output", | ||
entity_category=EntityCategory.CONFIG, |
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.
entity_category=EntityCategory.CONFIG, |
This is the main device Switch output and not a config entity
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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: