Commit Graph

59 Commits (985e42e50c2205f7dbaaac4d369d67bd9c97f758)

Author SHA1 Message Date
epenet a5dc4cb1c7
Fix incorrect `zeroconf` type hint in tests (#118465)
* Fix incorrect `mock_async_zeroconf` type hint

* Adjust thread

* One more

* Fix mock_zeroconf also

* Adjust

* Adjust
2024-05-30 21:57:09 +02:00
epenet 242ee04642
Improve type hints in tests (i-p) (#118380) 2024-05-30 08:47:08 +02:00
epenet 44f715bd02
Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54: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
puddly fc34453caa
Support the Home Assistant Connect ZBT-1 (#114213) 2024-03-27 18:20:48 +01: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 5267e4f5db
Fix race in otbr config flow (#111044)
* fix otbr

* Update homeassistant/components/otbr/config_flow.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* unique ids should not change

* handle missing unique id

* handle missing unique id

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-21 22:02:44 -05:00
Marc Mueller 438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +01:00
Erik Montnemery fcfacaaabd
Store preferred border agent extended address for each thread dataset (#109065) 2024-01-31 00:57:46 +01:00
Erik Montnemery 823f268054
Randomize thread network names (#108302)
* Randomize thread network names

* Use PAN ID as network name suffix

* Apply suggestions from code review

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update tests

* Format code

* Change format of network name again

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-01-23 22:58:28 +01:00
Erik Montnemery cdb798bec0
Don't always set first thread dataset as preferred (#108278)
* Don't always set first thread dataset as preferred

* Update tests

* Make clarifying comments clearer

* Call asyncio.wait with return_when=ALL_COMPLETED

* Update otbr test

* Update homeassistant/components/thread/dataset_store.py

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update homeassistant/components/thread/dataset_store.py

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-01-18 16:32:29 +01:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Erik Montnemery 94ad4786c3
Include extended address in response to WS otbr/info (#98440) 2023-08-15 09:48:29 +02:00
Erik Montnemery 71b92265af
Include border agent id in response to WS otbr/info (#98394)
* Include border agent id in response to WS otbr/info

* Assert border agent ID is not None
2023-08-15 09:17:47 +02:00
Erik Montnemery 6c7f50b5b2
Simplify error handling in otbr async_setup_entry (#98395)
* Simplify error handling in otbr async_setup_entry

* Create issue if the OTBR does not support border agent ID

* Update test

* Improve test coverage

* Catch the right exception
2023-08-15 08:27:50 +02:00
Erik Montnemery e0fd83daab
Store preferred border agent ID for each thread dataset (#98384) 2023-08-14 15:47:18 +02:00
Erik Montnemery 318b8adbed
Set preferred router when importing OTBR dataset (#98379) 2023-08-14 13:40:32 +02:00
Erik Montnemery 1ee0c907b0
Improve OTBR factory reset (#98017)
Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-08-08 11:38:01 +02:00
Erik Montnemery b53eae2846
Add WS command for changing thread channels (#94525) 2023-07-19 10:48:32 +02:00
Erik Montnemery c79fa87a7f
Fix check for HA Yellow radio in otbr config flow (#96789) 2023-07-17 22:21:52 +02:00
Erik Montnemery 49a27bb9a7
Fix otbr test (#96788) 2023-07-17 22:12:59 +02:00
Erik Montnemery 863b36c0c3
Include addon name in otbr config entry title (#96786) 2023-07-17 21:26:15 +02:00
Erik Montnemery 8559af8232
Remove extra otbr config entries (#96785) 2023-07-17 21:23:20 +02:00
Erik Montnemery 1e3fdcc4d1
Prevent otbr creating multiple config entries (#96783) 2023-07-17 21:22:50 +02:00
Erik Montnemery 23d15850da
Use addon name as title in otbr hassio flow (#87081)
* Use addon name as title in otbr hassio flow

* Address review comments
2023-06-08 23:04:12 +02:00
Erik Montnemery 1fa2fb4639
Fix OTBR reset (#94157) 2023-06-07 18:42:40 +02:00
Erik Montnemery 15e5cf01bb
Add `silabs_multiprotocol` platform (#92904)
* Add silabs_multiprotocol platform

* Add new files

* Add ZHA tests

* Prevent ZHA from creating database during tests

* Add delay parameter to async_change_channel

* Add the updated dataset to the dataset store

* Allow MultipanProtocol.async_change_channel to return a task

* Notify user about the duration of migration

* Update tests
2023-06-01 12:32:14 +02:00
Erik Montnemery 11299c4537
Deduplicate Thread datasets based on EXTPANID (#93795)
* Deduplicate Thread datasets based on EXTPANID

* Apply suggestions from code review
2023-05-30 16:16:56 +02:00
Erik Montnemery 16d8c8d4d5
Bump python-otbr-api to 2.1.0 (#93790)
* Bump python-otbr-api to 2.1.0

* Fix tests
2023-05-30 12:47:46 +02:00
Erik Montnemery 901624ad6f
Adapt otbr to upstream openthread REST API changes (#93544)
* Adapt otbr to upstream openthread REST API changes

* Bump python-otbr-api to 2.0.0
2023-05-30 10:11:21 +02:00
Erik Montnemery 63f3767a29
Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
Erik Montnemery c3091fad4c
Raise repair issue if OTBR and ZHA are on different channels (#90494)
* Raise repair issue if OTBR and ZHA are on different channels

* Update issues after creating or setting dataset

* Explain impact

* Add link to documentation, adjust language

* Update homeassistant/components/otbr/strings.json

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-03 13:02:10 -04:00
Erik Montnemery 3c3860c923
Make OTBR use same channel as ZHA (#88546) 2023-03-28 12:34:25 +02:00
Erik Montnemery 130c8ea5f5
Update OTRB config entry if REST API port has changed (#90101)
* Update OTRB config entry if REST API port has changed

* Improve test coverage
2023-03-22 14:03:39 +01:00
Erik Montnemery c2c809682a
Tweak OTBR tests (#89694) 2023-03-14 21:26:16 +01:00
Erik Montnemery 85e0177195
Add WS command for connecting OTBR to a known Thread network (#89692)
* Add WS command for connecting OTBR to a known Thread network

* Add test
2023-03-14 15:28:06 +01:00
Erik Montnemery 2f4e9c8ef3
Use otbr domain as dataset source (#89653) 2023-03-13 20:56:09 -04:00
Erik Montnemery d422b0dcc2
Make OTBR add newly created dataset to thread credential store (#89645) 2023-03-13 14:09:09 -04:00
Erik Montnemery a230732087
Correct naming of some otbr tests (#89631) 2023-03-13 13:56:08 +01:00
Erik Montnemery 09915f8047
Add WS API for getting an OTBR's extended address (#89384)
* Add WS API for getting an OTBR's extended address

* Bump python-otbr-api to 1.0.8

* Really add require_admin decorator to otbr WS API
2023-03-08 15:52:53 -05:00
Erik Montnemery f93bd8ef2c
Only allow channel 15 during configuration of OTBR (#88874)
* Only allow channel 15 during automatic configuration of OTBR

* Also force channel 15 when creating a new network
2023-02-28 11:08:45 -05:00
Erik Montnemery f41bec6ba9
Create repairs issue if Thread network is insecure (#88888)
* Bump python-otbr-api to 1.0.5

* Create repairs issue if Thread network is insecure

* Address review comments
2023-02-28 13:50:56 +01:00
Erik Montnemery ff4de8cd06
Add WS API for creating a Thread network (#88830)
* Add WS API for creating a Thread network

* Add tests
2023-02-27 10:19:13 -05:00
Erik Montnemery aeb6c4f078
Tweak OTBR tests (#88839) 2023-02-27 13:59:16 +01:00
Erik Montnemery 473db48943
Bump python-otbr-api to 1.0.4 (#88613)
* Bump python-otbr-api to 1.0.4

* Adjust tests
2023-02-22 15:31:02 -05:00
Paulus Schoutsen c6ff79aa0e
Error checking for OTBR (#88620)
* Error checking for OTBR

* Other errors in flow too

* Tests
2023-02-22 20:58:11 +01:00
Erik Montnemery 6254200b37
Fix otbr tests (#88184) 2023-02-15 16:19:46 +01:00