1
0
mirror of https://github.com/home-assistant/core.git synced 2025-06-14 10:07:08 +00:00

35 Commits

Author SHA1 Message Date
puddly
23839a7f10
Wrap most ZHA exceptions in HomeAssistantError ()
* 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
77f38e33e5
Import names from typing instead of typing_extensions [3.11] () 2023-07-22 17:03:44 -05:00
Erik Montnemery
334dacc322
Change Entity.name default to UNDEFINED ()
* Change Entity.name default to UNDEFINED

* Update typing

* Update Pylint plugin

* Update TTS test
2023-06-15 11:09:53 +02:00
puddly
22dfa8797f
Bump ZHA dependencies ()
* 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
6057aeee2f
Prevent NumberEntity and RestoreEntity inheritance () 2023-05-24 20:59:14 +02:00
puddly
6842cdcb65
Clean up default ZHA entity names ()
* 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 ()
* rename channel -> cluster handler

* remove refs to channels and create endpoint class

* remove remaining references to channels

* fix filter

* take in latest changes from 

* missed one

* missed a reference
2023-04-19 10:47:07 -04:00
codyhackw
4f507e7f57
Update Inovelli Blue Series switch support in ZHA ()
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
2023-04-12 22:09:16 +02:00
TheJulianJES
12f49006cf
Add Aqara E1 thermostat entities to ZHA ()
* Add Aqara E1 thermostat entities (WIP)

* Remove calibrate button for now

* Add diagnostic entity category to calibrated + external sensor

* Add multiplier for ZHA config number/away preset temp

* Set default multiplier correctly

* Add and use `CONFIG_DIAGNOSTIC_MATCH` for diagnostic entities
2023-03-28 21:12:21 -04:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Marc Mueller
a5d376069a
Add Self typing (2) [mypy 1.0] () 2023-02-06 23:23:52 -05:00
TheJulianJES
f740312247
Fix some typos in ZHA comments ()
* 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
David F. Mulcahey
5329a679bb
Add Aqara c1 pet feeder support to ZHA ()
* Add Aqara c1 pet feeder support to ZHA

* clean up

* cleanup

* state classes for daily measurements

* cleanups

* cleanups

* restore the refreshing of the inverted value cache

* cleanup
2022-11-21 18:03:17 -05:00
David F. Mulcahey
d47fe35a88
Add config entities for lumi.motion.agl04 () 2022-11-21 18:02:54 -05:00
TheJulianJES
523c3089f7
Add TI router transmit power config entity to ZHA ()
Make TI Router Transmit Power configurable in ZHA
2022-11-07 08:54:43 -05:00
Julian Löhr
6795627734
Add ZHA StartUpColorTemperature configuration entity ()
* Add ZHA start up color temperature entity

* Use device reported min max values

* Add color number test

* Fix code style
2022-10-23 18:46:47 -04:00
TheJulianJES
3126762707
Add friendly name to ZHA config entities ()
* Add friendly name to ZHA config entities

* Follow HA capitalization conventions

* Change from "Start-up level" to "Start-up current level"

* Remove siren select friendly names (temporarily)

* Change tests to expect new entity ids

* Re-add siren select friendly names

* Change siren tests to expect new entity ids
2022-10-09 09:11:42 -04:00
David F. Mulcahey
547a63e314
Remove unnecessary config entity from ZHA () 2022-10-02 11:07:19 -04:00
David F. Mulcahey
2ed48a9b28
Add configuration entities and device actions for Inovelli Blue Series switch to ZHA ()
* Add Inovelli configutation entities to ZHA

* add device actions

* fix attribute name collision

* add device action tests

* disable remote protection per Inovelli request

* expect_reply to false

* update test for expect_reply change

* inovelli feedback

* translation keys and strings

* clean up numbers

* prevent double events

* remove individual LED defaults per inovelli

* redundant check

* update test
2022-09-28 14:22:39 -04:00
epenet
38c57944fa
Improve type hints in zha number entity () 2022-08-09 18:32:36 +02:00
Marc Mueller
a3b2b5c328
Add zha typing [classmethods] () 2022-07-20 12:03:30 +02:00
Erik Montnemery
924dce1b86
Log warning if number entities set _attr_unit_of_measurement () 2022-07-11 17:44:07 +02:00
Arne Mauer
d8030ed9e7
Ikea Starkvind support all models ()
* Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component

* Fixed black and flake8 test

* New sensors and manufacturer cluster to support IKEA STARKVIND (with quirk)

* Fix multi_match for FilterLifeTime, device_run_time, filter_run_time sensors for Ikea starkvind

* Remove model match because sensors are matched with manufacturer channel

* Update manufacturerspecific.py

* Update number.py
2022-07-07 14:28:33 -04:00
Arne Mauer
f975d30258
Fix multi_match to match with the IKEA airpurifier channel ()
Fix multi_match for FilterLifeTime, device_run_time, filter_run_time sensors for ikea starkvind
2022-07-05 10:35:05 +02:00
Arne Mauer
fa678d0408
New sensors and manufacturer cluster to support IKEA STARKVIND (with Quirk) ()
* Add Particulate Matter 2.5 of ZCL concentration clusters to ZHA component

* Fixed black and flake8 test

* New sensors and manufacturer cluster to support IKEA STARKVIND (with quirk)

* Isort and codespell fixes

* Instead using the fan cluster, i've created a Ikea air purifier cluster/channel that supports all sensors and fan modes

* update sensors to support the new ikea_airpurifier channel

* Fix black, flake8, isort

* Mylint/mypy fixes + Use a TypedDict for REPORT_CONFIG in zha 

* Last fix for test_fan.py

* fix fan test

Co-authored-by: David F. Mulcahey <david.mulcahey@me.com>
2022-06-29 11:44:40 -04:00
Erik Montnemery
66feac2257
Finish migrating zha NumberEntity to native_value () 2022-06-17 12:15:59 +02:00
Erik Montnemery
576de9ac40
Migrate NumberEntity u-z to native_value () 2022-06-14 08:15:56 -10:00
David F. Mulcahey
9591d5366e
Add config entities for the Aqara P1 motion sensor to ZHA ()
* initial work for configurable detection interval

* update opple cluster channel

* detection interval

* motion sensitivity

* only set the init attributes for the right device

* add trigger indicator configuration entity
2022-05-25 08:57:26 +02:00
rforro
db815a7504
ZHA Add entities for Lidl water valve quirk ()
* 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
57c94c0350
Add additional configuration entities for ZHA lights ()
* Add more configuration entities for ZHA lights

* fix typing circular imports

* enhance filter in entity factory

* fix read attribute chunking

* add test

* add exception test
2022-05-16 13:04:32 -04:00
David F. Mulcahey
1eb5316d89
Remove unnecessary update_before_add from ZHA ()
* Additional streamlining for ZHA entity init

* fix tests
2022-04-28 20:57:26 +02:00
epenet
eafece3651
Add setup type hints (part 1) ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-12 08:49:46 +01:00
David F. Mulcahey
f6ac856b8d
Use async_on_unload from config entry in ZHA ()
* remove DATA_ZHA_DISPATCHERS

* update typing information

* fix rebase
2021-12-11 11:50:03 -05:00
David F. Mulcahey
a17031630f
Use Platform enum in ZHA () 2021-12-11 11:06:39 -05:00
Shulyaka
0b8529a472
Add zha AnalogOutput cluster support ()
* Initial commit
* black
* isort
* Commit suggestion from code review
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>

* pylint
* removed entity cache for present_value
* fix discovery
* move write_attributes to channel
* write_attributes fix
* write_attributes yet another fix
* update_before_add=False
* mains powered test device
* removed test_restore_state
* flake8
* removed async_configure_channel_specific
* don't know what this patch does, removing
* test for async_update
* removed node_descriptor
* fix unit_of_measurement
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-12-14 15:32:45 -05:00