Commit Graph

15 Commits (7e11fec761dcdc108cd8e355c4f19d1a79d50270)

Author SHA1 Message Date
Sid d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
Marc Mueller 87165c0d6e
Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
David F. Mulcahey 73b6e2bac8
Add support for ZHA entities exposed by Zigpy quirks (#111176)
* Add counter entities to the ZHA coordinator device

* rework to prepare for non coordinator device counters

* Initial scaffolding to support quirks v2 entities

* update for zigpy changes

* add assertion error message

* clean up test

* update group entity discovery kwargs

* constants and clearer names

* apply custom device configuration

* quirks switches

* quirks select entities

* quirks sensor entities

* update discovery

* move call to super

* add complex quirks v2 discovery test

* remove duplicate replaces

* add quirks v2 button entity support

* add quirks v2 binary sensor entity support

* fix exception in counter entitiy discovery

* oops

* update formatting

* support custom on and off values

* logging

* don't filter out entities quirks says should be created

* fix type alias warnings

* sync up with zigpy changes and additions

* add a binary sensor test

* button coverage

* switch coverage

* initial select coverage

* number coverage

* sensor coverage

* update discovery after rebase

* coverage

* single line

* line lengths

* fix double underscore

* review comments

* set category from quirks in base entity

* line lengths

* move comment

* imports

* simplify

* simplify
2024-02-29 10:38:21 -05:00
puddly 23839a7f10
Wrap most ZHA exceptions in `HomeAssistantError` (#98421)
* Wrap attribute writes in a helper throwing `HomeAssistantError`

* Do not check for `Exception` instances, they are now propagated

* Write `cie_addr` synchronously

* Fix unnecessary `if` in `async_set_native_value`

* Fix unit tests

* Use `HomeAssistantError` in cover commands

* Revert writing `cie_addr` synchronously

* Disallow proxying of some cluster methods to fix unit test warnings

* Unit test cover failures to increase coverage

* Unit test missing climate device

* Unit test remaining cover commands
2023-08-28 17:24:12 -04:00
Marc Mueller 544d6b05a5
Replace mock_coro with AsyncMock (#99014)
* Replace mock_coro with AsyncMock

* Remove mock_coro test helper function

* Remove redundant AsyncMock
2023-08-25 22:54:55 +02:00
Franck Nijhof 43fe30f6ee
Use identify device class in ZHA identify button entity (#95373) 2023-06-27 17:42:13 +02:00
puddly 22dfa8797f
Bump ZHA dependencies (#93989)
* Make `find_entity_id` synchronous

* Remove `tries`

* Use new `attribute_updated` event signature

* Validate attributes before creating entities

* Avoid swallowing exceptions when opening covers

* Bump ZHA dependencies

* Add a matcher for Sinope water leak sensors using a non-standard ZCL attribute

* Ensure handler matching is strict, not multi

* Add type annotations for newly-updated functions
2023-06-14 21:42:31 -04:00
epenet 7427d4f323
Add type hints to integration tests (zha) (#88309) 2023-02-17 18:54:26 +01:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
TheJulianJES f740312247
Fix some typos in ZHA comments (#84881)
* Fix copy paste errors

* Fix "setup/set up" usage

* Fix typo

* Fix comment

* Fix copy paste errors

* Remove space at end of comment

* Remove double word

* Fix copy paste errors

* Fix typos

* Apply review suggestion

* Upper-case zha (to ZHA) everywhere

* Review: fix "over rules"

* Review: most/more
2023-01-02 00:20:59 -05:00
epenet 25b1dfb53a
Cleanup EntityCategory in tests (#78808) 2022-09-20 10:49:44 -04:00
epenet 7bc2712142
Adjust root-import in tests (#78761)
* Adjust root-import in tests

* Adjust diagnostics

* Adjust button

* Adjust select

* Adjust device_tracker

* Adjust camera

* Adjust humidifier

* Adjust media_source

* Adjust update

* Adjust siren

* Adjust number

* Adjust alarm_control_panel

* Adjust notify

* Adjust sensor

* Adjust switch

* Revert anthemav

* Don't adjust demo humidifier
2022-09-19 15:22:23 +02:00
J. Nick Koston 4bc5d7bfed
Speed up zha tests (#73627) 2022-06-17 11:41:10 -05:00
rforro db815a7504
ZHA Add entities for Lidl water valve quirk (#72307)
* init

* added timer number entity

* added write attribute button entity

* fixed missed errors

* minor changes & fixed failing test

* removed icon

* unit and icons
2022-05-24 19:56:03 -04:00
David F. Mulcahey 41531b528e
Add identify buttons to ZHA devices (#61495)
* Identify buttons

* clean up and add test

* use Platform

* update device list

* Only 1 identify button per device

* cleanup press until the need arises for the branch

* make imports relative
2021-12-23 17:52:42 -05:00