Fix method to enable in-home doorbell chime#419
Conversation
removing boolean message as only async_set_existing_doorbell_type_duration used it and is no longer needed.
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 13592133 | Triggered | Google API Key | 2d5d4cc | ring_doorbell/const.py | View secret |
| 13592133 | Triggered | Google API Key | 82088d9 | ring_doorbell/const.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Blank lines added to summary/description text per ruff check.
sdb9696
left a comment
There was a problem hiding this comment.
As per comment please keep the public api unchanged.
Also please ensure you've done poetry install and run pre-commit to ensure the CI checks pass locally.
|
I've never actually used these methods. What do they actually do? Can you actually set a doorbell type to manual or digital. Is this something available on all devices that derive from doorbots? i.e. stickup_cams etc. |
|
It's only available for (most) doorbell models. It lets the Ring doorbell trigger the in-home doorbell chime. Not present = you don't have one (or want to use it) For digital, you can also set the duration, but I do not have a digital in-home chime so I can't test that aspect and will leave it out of the home assistant changes I will submit. I used to use a homebridge automation that would turn the in-home doorbell off during the day to prevent the dogs from going nuts, but then would have it turn on at night when our phones are on do not disturb or if we had someone watching the house. https://ring.com/support/articles/vk1ml/configuring-your-doorbell-for-an-in-home-chime |
|
Ah ok that makes sense, very helpful thanks. So the doorbell doesn't actually know what kind of chime it's connected to? It has to be told in the app and the api? |
|
Cool. So I think it would be good to have test coverage for this, especially if it's going to be enabled in HA. |
|
Sounds good. I am brand new to pytest, so will read up on it this weekend, but may take some time to implement. |
|
@sdb9696 I've added a test for the async_set_existing_doorbell_type_enabled function. Please let me know if you had additional tests in mind, thanks! |
|
Thanks for the PR @briangoldstein! N.B. I added some asserts and extra steps to the tests. |
## [0.9.3](https://github.com/python-ring-doorbell/python-ring-doorbell/tree/0.9.3) (2024-09-02) [Full Changelog](0.9.2...0.9.3) **Release highlights:** - The python-ring-doorbell code repository has moved to https://github.com/python-ring-doorbell/python-ring-doorbell - Fix for enabling in-home chimes - Many thanks @briangoldstein! **Fixed bugs:** - Fix active listen alert counter [\#423](#423) (@sdb9696) - Fix method to enable in-home doorbell chime [\#419](#419) (@briangoldstein) **Documentation updates:** - Update supported python version in readme [\#422](#422) (@sdb9696) **Project maintenance:** - Migrate repo to python-ring-doorbell github organisation [\#421](#421) (@sdb9696) - Remove anyio from dependencies [\#420](#420) (@dotlambda)
I am currently working on adding code to the Home Assistant ring core component to support
async_set_existing_doorbell_typeandasync_set_existing_doorbell_type_enabled. In working on the switch to enable/disable the in-home chime, I found that Ring is expecting a string, not a boolean value. Error below:Ring is expecting 0 or 1 when enabling and disabling. I have tested the code change with a modified test.py with the following body between
await ring.async_update_data()andawait auth.async_close()