55 Commits

Author SHA1 Message Date
Maciej Bieniek
53f1dd8adf
Improve error handling and add exception translations for NextDNS integration (#141005)
* Add exception translations

* Coverage

* Add missing auth_error

* Coverage

* Use async_start_reauth

* Fix test

* Remove method placeholder
2025-03-20 20:33:45 +02:00
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 ecb3bf79f32a2e25d141ff467e5958826ed9fc3a.

* 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
Erik Montnemery
ecb3bf79f3
Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115673c5b3fe40ea2f5d61b4b896f433e.
2024-12-18 13:51:05 +01:00
Erik Montnemery
ad15786115
Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01:00
Abílio Costa
d8dd6a99b3
Use default translation on SensorEntity unit_of_measurement (#131633)
* Use translations on SensorEntity unit_of_measurement property

* Use default language for unit translation

* Update brother integration snapshot

* Update snapshots
2024-11-27 14:45:53 +01:00
Maciej Bieniek
50013cf5c7
Add unit translations for NextDNS integration (#131281)
* Add unit translations for NextDNS integration

* Use translation keys
2024-11-23 18:04:49 +01:00
Erik Montnemery
d82bff1bc2
Index config entry discovery_keys by discovery domain (#126563)
* Index config entry discovery_keys by discovery domain

* Add new signal

* Update tests

* Update homeassistant/config_entries.py

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

* Fix imports

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 21:48:11 +02:00
Erik Montnemery
b2982c18bb
Reinitialize zeroconf discovery flow on unignore (#125753)
* Reinitialize zeroconf discovery flow on unignore

* Adjust tests

* Improve comments

* Fix logic for updating discovery keys

* Add tests

* Use mock_config_flow helper in new config_entries test

* Add discovery_keys attribute to ConfigEntry

* Update zeroconf rediscovery

* Change type of ConfigEntry.discovery_keys

* Update tests

* Fix DiscoveryKey.from_json_dict and add tests

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
Jan-Philipp Benecke
f311198da0
Fix failing nextdns coordinator test (#125859) 2024-09-13 08:34:55 +02:00
Erik Montnemery
482bed522f
Fix missing patch in nextdns tests (#125195) 2024-09-04 08:34:51 +02:00
Maciej Bieniek
50c1bf8bb0
Add re-auth flow to NextDNS integration (#125101) 2024-09-03 22:38:07 +02:00
Joost Lekkerkerker
e8d7eb05ae
Delete unused snapshots (#123656)
* Delete unused snapshots

* Delete unused snapshots
2024-08-12 13:28:09 +02:00
Robert Resch
ad50136dbd
Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
Maciej Bieniek
e764afecac
Bump nextdns to version 3.1.0 (#120703)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-27 23:12:20 +02:00
epenet
3d31af3eb4
Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
Maciej Bieniek
10be2cc004
Use snapshot test helper in NextDNS (#115895)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 18:43:40 +02:00
Maciej Bieniek
c8d52c02c5
Use snapshot testing in NextDNS (#115879)
* Use snapshot testing in NextDNS sensor

* Use snapshot testing in NextDNS switch

* Use snapshot testing in NextDNS binary sensor

* Use snapshot testing in NextDNS button

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 12:31:20 +02:00
Joost Lekkerkerker
5d500cb74b
Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
J. Nick Koston
96120b64e0
Fix missing mocking in nextdns tests (#114541) 2024-04-01 06:53:49 -10:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
J. Nick Koston
f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10:00
Marc Mueller
a9147cf3dd
Use builtin TimeoutError [k-n] (#109681) 2024-02-05 12:08:18 +01:00
Joost Lekkerkerker
a82410d5e9
Deduplicate constants E-Z (#105657) 2023-12-13 17:05:37 +01:00
Erik Montnemery
6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
c0ffeeca7
4e63823970
Rename Twitter to X (#102214) 2023-10-20 12:02:43 +02:00
Maciej Bieniek
d8f1023210
Use entity_registry_enabled_by_default fixture in the NextDNS tests (#101339) 2023-10-03 22:07:17 +02:00
Jan-Philipp Benecke
fb42042402
Use snapshot assertion for nextdns diagnostics test (#99157) 2023-08-30 12:22:10 +02:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Maciej Bieniek
8389086388
Add new parental control switches for NextDNS (#91507) 2023-04-22 18:09:54 +02:00
Maciej Bieniek
09c41ca2d8
Bump nextdns to version 1.4.0 (#91490) 2023-04-16 13:51:07 +02:00
epenet
7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
Maciej Bieniek
2f22613cf9
Address late review for NextDNS entity name translations (#90771) 2023-04-04 12:56:39 +02:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
a79be493e5
Adjust hass_client type hint in integration tests (#86954)
* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
2023-02-02 16:29:57 -05:00
Franck Nijhof
a79885ceaf
Enable Ruff SIM117 (#86783) 2023-01-27 11:52:49 +01:00
Maciej Bieniek
34633b0ede
Bump nextdns library to 1.2.0 (#82643) 2022-11-24 19:24:47 +01:00
epenet
00dd27ef1b
Apply hass-relative-import to tests (i-r) (#78732) 2022-09-19 09:46:59 +02:00
Maciej Bieniek
cba2893862
Set quality scale to platinum in the NextDNS integration (#77099)
* Set quality scale to platinum

* Catch exceptions on when service calls

* Add tests
2022-08-21 22:08:57 -07:00
Maciej Bieniek
681b726128
Add parental control switches to NextDNS integration (#76559)
* Add new switches

* Make new switches disabled by default

* Update tests
2022-08-18 11:40:24 +02:00
Maciej Bieniek
6eb1dbdb74
Add NextDNS binary sensor platform (#75266)
* Add binary_sensor platform

* Add tests

* Add quality scale

* Sort coordinators

* Remove quality scale

* Fix docstring
2022-08-09 17:51:04 +02:00
Maciej Bieniek
753a3c0921
Add new sensors to NextDNS integration (#76262)
* Add DNS-over-HTTP/3 sensors

* Update tests
2022-08-09 17:45:48 +02:00
Maciej Bieniek
9f240d5bab
Bump NextDNS backend library (#76300)
* Bump NextDNS backend library

* Update tests

* Update diagnostics tests

* Use fixtures
2022-08-08 07:52:36 -07:00
Maciej Bieniek
88a5ab1e1e
Bump NextDNS library (#76207) 2022-08-04 14:01:26 +02:00
Maciej Bieniek
cb543a21b3
Address NextDNS late review (#75635)
* Init instance attributes

* Remove condition

* Improve typing in tests

* Suggested change
2022-07-23 00:58:48 +02:00
Maciej Bieniek
5b555066ea
Add new NextDNS sensors (#74789) 2022-07-23 00:18:22 +02:00
Maciej Bieniek
c1a4dc2f22
Add NextDNS switch platform (#74512)
* Add switch platform

* Use lambda to get state

* Use async with timeout

* Add tests

* Use correct type

* Use Generic for coordinator

* Use TCoordinatorData

* Cleanup generic

* Simplify coordinator data update methods

* Use new entity naming style

* Remove unnecessary code

* Only the first word should be capitalised

* Suggested change

* improve typing in tests

* Improve typing intests

* Update tests/components/nextdns/__init__.py

* black

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-07-11 16:00:13 +02:00
Maciej Bieniek
fd7330ea77
Bump NextDNS backend library (#74611) 2022-07-08 09:48:46 +02:00