Commit graph

13 commits

Author SHA1 Message Date
Marc Mueller
c773d57d39
Add empty line after module docstring [w-z] (#112706) 2024-03-08 10:35:45 -05:00
David F. Mulcahey
3f31a76692
Apply consistent naming to ZHA cluster handler implementations (#108851)
* Apply consistent naming to ZHA cluster handler implentations

* remove import alias

* remove if statement around assert in test
2024-01-25 20:09:38 -05: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
6842cdcb65
Clean up default ZHA entity names (#91841)
* Always use `Light` for lights, including subclasses

* Clean up other platforms

* Add a unit test to ensure all future entity classes have names

* Remove stale `_name`

* Address review feedback and rename `Open` to `Opening`
2023-04-25 19:51:39 -04:00
David F. Mulcahey
9c784ac622
Refactor ZHA (#91476)
* rename channel -> cluster handler

* remove refs to channels and create endpoint class

* remove remaining references to channels

* fix filter

* take in latest changes from #91403

* missed one

* missed a reference
2023-04-19 10:47:07 -04:00
epenet
ff356205bf
Use platform constants from root (#78032) 2022-09-08 12:24:45 +02:00
epenet
f43cc18aa3
Fix type hints in zha platforms (#73745)
* Adjust binary_sensor

* Adjust device_action

* Adjust device_tracker

* Adjust fan

* Adjust lock

* Adjust siren
2022-06-20 11:31:16 -04:00
epenet
06e45893aa
Remove invalid type definitions in zha (#73596) 2022-06-20 11:28:53 +02:00
David F. Mulcahey
1eb5316d89
Remove unnecessary update_before_add from ZHA (#71010)
* Additional streamlining for ZHA entity init

* fix tests
2022-04-28 20:57:26 +02:00
epenet
af57f9c6a4
Use SirenEntityFeature enum in components (#69645) 2022-04-08 09:13:12 +02:00
David F. Mulcahey
6a685f0315
Add select entities to ZHA (#62718) 2022-01-04 13:40:29 +01:00
David F. Mulcahey
a17031630f
Use Platform enum in ZHA (#61016) 2021-12-11 11:06:39 -05:00
David F. Mulcahey
02b5449648
Add support for siren entities in ZHA (#60920) 2021-12-03 19:23:57 +01:00