Add motion detection enable/disable to ring camera platform (#108789)

* Add motion detection enable/disable to ring camera platform

* Write ha state directly

Co-authored-by: J. Nick Koston <nick@koston.org>

* Parametrize on off state tests

* Add tests for errors on setting motion detection

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Steven B 2024-03-12 15:05:14 +00:00 committed by GitHub
parent 42574fe498
commit 5e530fc42e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 186 additions and 0 deletions

View file

@ -121,4 +121,11 @@ def requests_mock_fixture():
status_code=200,
json={"url": "http://127.0.0.1/foo"},
)
# Mocks the response for setting properties in settings (i.e. motion_detection)
mock.patch(
re.compile(
r"https:\/\/api\.ring\.com\/devices\/v1\/devices\/\d+\/settings"
),
text="ok",
)
yield mock