Commit fbefe2e
Add async Websocket client (#212)
* Add base Websocket class
* Add Async Websocket client
* Rework structure and fix typing
* Fix typing
* Add testing
* Use breaks instead of zip(range(1), ...) in async event tests
* fixes from rebase
* Add config entry websocket methods and fix Domain.from_json usage
Use Domain.from_json_with_client() in websocket clients since Domain
requires a client reference. Add config entry methods (get, disable,
enable, ignore flow, subentries, subscribe) to RawWebsocketClient.
* Add async config entry methods and improve test coverage to 99%
Add async counterparts for all config entry websocket methods in
RawAsyncWebsocketClient. Add async tests for websocket state, entity,
config entry, and error path coverage. Fix conftest return type
annotation, replace zip(range) with break, and use pytest.raises
instead of try/except in error tests.
---------
Co-authored-by: Adam Logan <adamlogan73@gmail.com>1 parent 4ef4c92 commit fbefe2e
11 files changed
Lines changed: 1650 additions & 595 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
618 | 623 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
| |||
647 | 646 | | |
648 | 647 | | |
649 | 648 | | |
650 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
651 | 655 | | |
652 | 656 | | |
653 | 657 | | |
| |||
0 commit comments