Commit Graph

87 Commits (1e001469f6315dcadebd0316fd1878c9b8dcbdee)

Author SHA1 Message Date
epenet 906cecf087
Cleanup unused snapshots (#128549)
* Cleanup unused snapshots

* Cleanup a few more

* Cleanup systemmonitor

* Cleanup voip
2024-10-17 10:41:57 +02:00
Steven B. 554629f37a
Fix ring realtime events (#128083) 2024-10-11 17:17:32 +02:00
Steven B. 33d0343089
Extend dhcp discovery flow for ring integration (#126661) 2024-09-27 19:03:43 +02:00
Steven B. 010a5d2829
Add snapshots to all ring platform tests (#126560)
Add test snapshots to all ring platform tests
2024-09-24 10:53:19 +02:00
Steven B. 42f8d9d10f
Add motion detection switch entity to ring (#126278)
Add motion detection switch to ring
2024-09-20 11:27:05 +02:00
Steven B. efdb1073a1
Add in-home chime switch to ring (#126305)
* Add in-home chime switch to ring

* Fix accidental conftest change
2024-09-20 10:45:22 +02:00
Steven B. b18b532b40
Bump ring-doorbell to 0.9.5 (#126264)
* Bump ring_doorbell to 0.9.5

* Update number snapshot
2024-09-19 19:40:39 +02:00
Daniel Krebs c8e2408f82
Allow setting volume on Ring devices (#125773)
* Turn Ring Doorbell and Chime volumes into number entities.

* turn RingOther volumes into numbers as well

* fix linter issues

* move other volume strings into `number` section

* add back old volume sensors but deprecate them

* add tests for `ring.number`

* add back strings for sensors that have just become deprecated

* remove deprecated volume sensors from test

* Revert "remove deprecated volume sensors from test"

This reverts commit fc95af66e7.

* create entities for deprecated sensors so that tests still run

* remove print

* add entities immediately

* move `RingNumberEntityDescription` above `RingNumber` and remove unused import

* remove irrelevant comment about history

* fix not using `setter_fn`

* add missing icons for other volume entities

* rename `entity` -> `entity_id` in number tests

* fix typing in number test

* use constants for `hass.services.async_call()`

* use `@refresh_after` decorator instead of delaying updates manually

* move descriptors above entity class

* Use snapshot to test states.

* add missing snapshot file for number platform

* Update homeassistant/components/ring/number.py

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>

---------

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2024-09-17 15:41:51 +02:00
Steven B. ba856dac4e
Migrate ring cam siren from switch to siren platform (#125761) 2024-09-13 15:39:22 +02:00
Steven B. eae4618c52
Migrate ring siren and switch platforms to entity descriptions (#125775) 2024-09-13 14:27:33 +02:00
Steven B. 75d3ea34fc
Add test snapshots to ring switch and siren platforms (#125771) 2024-09-11 19:46:26 +02:00
Jan-Philipp Benecke bbdc036c3e
Remove deprecated `ring.update` action (#125762) 2024-09-11 16:27:07 +02:00
Steven B. 26ac8e35cb
Add event platform to ring (#125506) 2024-09-08 13:32:34 -05:00
Steven B. b3d6f8861f
Fix ring notifications (#124879)
* Enable ring event listener to fix missing notifications

* Fix pylint test CI fail

* Reinstate binary sensor and add deprecation issues

* Add tests

* Update post review

* Remove PropertyMock

* Update post review

* Split out adding event platform
2024-09-08 18:17:30 +02:00
Steven B. eda1656e75
Abort ring config_flow if account is already configured (#125120)
* Abort ring config_flow if account is already configured

* Update tests/components/ring/test_config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-03 15:22:38 +02:00
Steven B. 22b6239304
Convert ring integration to use entry.runtime_data (#125127) 2024-09-03 12:04:35 +02:00
Steven B. e26d363b5e
Convert ring integration to the async ring-doorbell api (#124365)
* Bump ring-doorbell to 0.9.0

* Convert ring integration to async ring-doorbell api

* Use mock auth fixture class to get token_updater

* Fix typo in fixture name
2024-08-24 08:23:31 +02:00
epenet b4afca3e7e
Add missing hass type hint in component tests (r) (#124231) 2024-08-19 21:38:41 +02:00
Steven B. 099110767a
Add tests for ring camera platform for 100% coverage (#122197) 2024-07-19 19:35:44 +02:00
Marc Mueller f11b316dac
Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +02:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
epenet 1c8a9cc3b8
Remove unused caplog fixtures in tests (#119056) 2024-06-07 11:38:56 +02:00
Steven B 333ac56904
Fully mock the ring_doorbell api and remove requests_mock (#113140)
* Fully mock ring_doorbell library

* Add comments and docstrings

* Simplify devices_mocks and fake RingDevices

* Update post review

* Consolidate device filtering in conftest

* Fix ruff lambda assignment failure

* Fix ruff check fail

* Update post review
2024-06-06 20:13:19 +02:00
Marc Mueller 837ee7c4fb
Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
epenet 166c588cac
Add LogCaptureFixture type hints in tests (#118372) 2024-05-29 14:10:00 +02:00
epenet 8d8696075b
Use registry fixtures in tests (r) (#118293) 2024-05-28 14:23:31 +02:00
epenet 44f715bd02
Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54:20 +02:00
J. Nick Koston 5a609c34bb
Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
Steven B 6954fcc8ad
Add strict typing to ring integration (#115276) 2024-04-11 10:10:56 +02:00
Steven B 4cd2351bcc
Update and migrate ring non string unique ids (#115265)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-08 23:08:46 -10:00
Sid f8b6629b26
Enable Ruff PGH rules (#115091) 2024-04-08 15:42:22 +02:00
Joost Lekkerkerker f3ba713289
Use FlowResultType enum in config flow tests N-Z (#114682)
Use FlowResultType enum in config flow tests
2024-04-03 09:53:20 +02:00
Joost Lekkerkerker ee66f6ec8c
Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
Sid d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
Steven B 72614c86c2
Bump python-ring-doorbell to 0.8.8 (#114431)
* Bump ring_doorbell to 0.8.8

* Fix intercom history test for new library version

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-29 12:47:21 +01:00
Marc Mueller efc54971d3
Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
cosimomeli 4107cd6ad8
Add Ring Intercom open door button (#113514)
* Add button

* Make Ruff happy

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Fix doc string

* Format

* Update tests/components/ring/test_button.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-15 15:31:51 +01:00
cosimomeli 360f7dea75
Add Ring Intercom support (#109819)
* Add button entity

* Add support for Ring intercom ("other" device type)

* description

* format

* - Tests
- Fallback when intercom devices arent inside response

* Fix ring button

* Update library

* Fix button after merge

* Move names to strings.json

* Remove button entity_category

* Add wifi sensors to other

* Add last_ sensors to other

* Fix tests

* Add button test

* Add new sensors tests

* Revert "Add last_ sensors to other"

This reverts commit 5c03bba5a1.

* Update library

* Revert "Revert "Add last_ sensors to other""

This reverts commit 27631978d0.

* Fix tests

* Remove default list for other

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>

* Copy mock to conftest

* Fix history test

* Change time skip

* Remove button

* Fix history test

---------

Co-authored-by: Martin Pham <tuyentq2009@gmail.com>
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2024-03-15 12:59:36 +01:00
Steven B 4aec48d358
Update ring integration imports (#113397)
Update ring imports for patching where library is created
2024-03-14 10:44:17 +01:00
Steven B 5e530fc42e
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>
2024-03-12 16:05:14 +01:00
Steven B eff0aac586
Ensure that the ring integration always raises HomeAssistantError for user actions (#109893)
* Wrap library exceptions in HomeAssistantErrors

* Remove commented

* Update post review

* Update post second review
2024-03-11 20:23:49 +01:00
Steven B 48cb09a4a8
Prepare ring update service for deprecation (#108781)
* Prepare ring update service for deprecation

* Update service removal release number
2024-03-11 13:42:52 +01:00
J. Nick Koston 65358c129a
Replace periodic tasks with background tasks (#112726)
* Phase out periodic tasks

* false by default or some tests will block forever, will need to fix each one manually

* kwarg works

* kwarg works

* kwarg works

* fixes

* fix more tests

* fix more tests

* fix lifx

* opensky

* pvpc_hourly_pricing

* adjust more

* adjust more

* smarttub

* adjust more

* adjust more

* adjust more

* adjust more

* adjust

* no eager executor

* zha

* qnap_qsw

* fix more

* fix fix

* docs

* its a wrapper now

* add more coverage

* coverage

* cover all combos

* more fixes

* more fixes

* more fixes

* remaining issues are legit bugs in tests

* make tplink test more predictable

* more fixes

* feedreader

* grind out some more

* make test race safe

* one more
2024-03-08 21:45:10 -05:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
Joost Lekkerkerker a3a758bd17
Add icon translations to Ring (#112212)
* Add icon translations to Ring

* Add icon translations to Ring
2024-03-05 08:45:33 +01:00
Livio Avalle c4247205ed
Add state_class to ring battery sensor for LTS (#109872)
* Add state_class to ring battery sensor for LTS

* Add test, in test_sensor.py, for state_class for battery entity; in response to comment in PR
2024-02-15 09:52:11 -06:00
Steven B 605b7312a4
Fix ring chimes data update (#109220)
* Fix bug with chimes data update

* Trigger update in test with time change

* Fix test to use freezer

* Make test less fragile
2024-01-31 19:39:18 +01:00
Steven B f725258ea9
Add coordinator to ring integration (#107088) 2024-01-31 10:37:55 +01:00
sdb9696 38961c6ddc
Add diagnostics platform to ring integration (#104049)
* Add diagnostics platform to ring integration

* Use real-ish data for diagnostics test and use snapshot output
2023-11-16 14:36:15 +01:00