Commit Graph

94 Commits (c5222708ed16fa528f7336189a6e5994d0f44230)

Author SHA1 Message Date
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Steven B. 2f5816c5b6
Add exception translations to ring integration (#136468)
* Add exception translations to ring integration

* Do not include exception details in exception translations

* Don't check last_update_success for auth errors and update tests

* Do not log errors twice

* Update post review
2025-02-04 09:14:48 -06:00
Steven B. c7041a97be
Do not duplicate device class translations in ring integration (#136868) 2025-01-31 13:03:13 +01:00
epenet fe010289b4
Use new ServiceInfo location in component tests (part 2) (#136062) 2025-01-20 13:13:45 +01:00
Erik Montnemery 235fda55fe
Validate config entry when adding or updating entity registry entry (#135067) 2025-01-17 19:18:13 +01:00
Steven B. 147679f803
Add live view camera entity to ring integration (#127579) 2024-11-26 15:20:25 +01:00
Steven B. f8f87ec091
Add reconfigure flow to ring integration (#128357)
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-21 15:30:05 +02:00
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