Commit graph

9 commits

Author SHA1 Message Date
TheJulianJES
5d0c8947a1
Fix ZHA device diagnostics error for unknown unsupported attributes (#101239)
* Modify test to account for scenario of unknown unsupported attributes

* Add error checking for finding unsupported attributes

* Change comment to clarify zigpy misses an attribute def

This should make it more clear that it's about an unknown attribute (where zigpy doesn't have an attribute definition).

* Increase test coverage

This increases test coverage by doing the following:
- adding the `IasZone` to our test device, so we have a cluster which actually has some attribute definitions
- adding not just an unknown unsupported attribute by id, but also by name
- adding a known unsupported attribute by id and by name

* Fix diagnostics logic
2023-10-06 12:23:48 -04:00
puddly
cbb28b6943
Migrate internal ZHA data to a dataclasses (#100127)
* Cache device triggers on startup

* reorg zha init

* don't reuse gateway

* don't nuke yaml configuration

* review comments

* Add unit tests

* Do not cache device and entity registries

* [WIP] Wrap ZHA data in a dataclass

* [WIP] Get unit tests passing

* Use a helper function for getting the gateway object to fix annotations

* Remove `bridge_id`

* Fix typing issues with entity references in group websocket info

* Use `Platform` instead of `str` for entity platform matching

* Use `get_zha_gateway` in a few more places

* Fix flaky unit test

* Use `slots` for ZHA data

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

---------

Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-11 21:39:33 +02:00
puddly
3f398818c5
Perform an energy scan when downloading ZHA diagnostics (#90605) 2023-03-31 15:37:00 -04:00
puddly
7a5a882687
Bump ZHA dependencies (#88799)
* Bump ZHA dependencies

* Use `importlib.metadata.version` to get package versions
2023-02-27 15:07:57 -05:00
epenet
1766df3faa
Improve integration type hints for diagnostics (#85526) 2023-01-09 15:17:48 +01:00
David F. Mulcahey
a053a3a8a4
Add cluster attr data to ZHA device diagnostics (#70238)
* Add cluster attr data to ZHA device diagnostics

* add unsupported attributes and refactor

* remove await

* make parseable
2022-06-28 11:01:27 -04:00
epenet
b65b47f25e
Cleanup zha async method which is not awaiting (#72093)
* Cleanup zha async method which is not awaiting

* Missed a commit
2022-05-19 17:05:25 +02:00
David F. Mulcahey
53216883f8
ZHA diagnostics fixes (#70000) 2022-04-13 17:02:57 -04:00
David F. Mulcahey
5f37f58673
Add diagnostics support for ZHA (#69756) 2022-04-11 22:35:29 -07:00