Commit graph

53 commits

Author SHA1 Message Date
Joakim Plate
29e8814d1b
Add translation entiry support (zha) ()
* zha: Add translation to binary sensors

* Add some small test for name

* Add translations for sensors

* Correct some tests

* Adjust summation key

* Add translation keys for button

* Add translation keys to climate

* Add translation keys for cover

* Add translation keys to fan

* Add translations to light

* Add translations for lock

* Add translation keys to number

* Add translationk keys to select

* Add translations for switch entities

* Add translation to alarm control panel

* Map to some more standard device classes

* Use shorter references

* Remove explicit name from identify button

* Correct tests

* Correction after rebase
2023-10-17 21:59:49 +02:00
Caius-Bonus
5290396731
ZHA Component: Correct AttributeUpdated signal in Thermostat climate entity, ThermostatClusterHandler and ThermostatHVACAction sensor entity ()
* initial

* change other Thermostat climate entities

* remove AttributeUpdateRecord
2023-10-10 14:23:03 -04:00
puddly
cbb28b6943
Migrate internal ZHA data to a dataclasses ()
* 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
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
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
epenet
dace1add1f
Fix lingering timer in SinopeTechnologiesThermostat () 2023-04-19 18:19:58 +02: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
Franck Nijhof
ca1a12898c
Enable Ruff D212 () 2023-02-03 23:08:48 +01:00
epenet
c7a6b5983f
Use UnitOfTemperature in climate entities [t-z] () 2022-12-05 10:18:57 +01:00
epenet
39ac2c1101
Adjust type hints for ClimateEntityFeature () 2022-11-16 21:17:50 +01:00
javicalle
b8c574e9ab
Add _TZE200_kds0pmmv to ZHA ZONNSMARTThermostat ()
Add `_TZE200_kds0pmmv` to `ZONNSMARTThermostat`

Related to: https://github.com/zigpy/zha-device-handlers/pull/1843
2022-10-21 14:53:03 -04:00
zbeky
81b940ec17
Add EVOLVEO Heat M30v2 TRV () 2022-10-02 14:34:53 -04:00
javicalle
e5630c6a66
New ZONNSMART TRVs ()
Adds a few missing ZONNSMART TRVs
2022-09-27 16:25:36 -04:00
epenet
6affd9c6fb
Import climate constants from root [m-z] () 2022-09-10 23:42:28 +02:00
epenet
3a0eae3986
Improve entity type hints [z] () 2022-09-06 14:01:09 +02:00
epenet
e19e65908a
Use _attr_precision in entities () 2022-08-29 22:02:29 +02:00
epenet
0c401bcab2
Use _attr_temperature_unit in climate entities () 2022-08-29 10:20:55 +02:00
epenet
6c83ed4c9d
Fix api, button and climate type hints in zha ()
* Fix zha api type hints

* Fix zha button type hints

* Fix zha climate type hints
2022-06-21 21:02:08 -04:00
epenet
8745401af5
Use climate enums in zha () 2022-04-26 10:09:13 +02:00
TheJulianJES
e4a613a4b3
Add "LUX" manufacturer to "ZenWithin" ZHA thermostat () 2022-04-24 11:58:06 -04:00
epenet
fbea950eb0
Use EntityFeature enum in components (z**) ()
* Use EntityFeature enum in zha

* Use EntityFeature enum in zhong_hong

* Use EntityFeature enum in ziggo_mediabox_xl

* Use EntityFeature enum in zwave_js

* Use EntityFeature enum in zwave_me
2022-04-07 08:21:31 +02:00
puddly
0f6296e4b5
Bump zigpy to 0.44.1 and zha-quirks to 0.0.69 ()
* Make unit tests pass

* Flip response type check to not rely on it being a list
https://github.com/zigpy/zigpy/pull/716#issuecomment-1025236190

* Bump zigpy and quirks versions to ZCLR8 releases

* Fix renamed zigpy cluster attributes

* Handle the default response for ZLL `get_group_identifiers`

* Add more error context to `stage failed` errors

* Fix unit test returning lists as ZCL request responses

* Always load quirks when testing ZHA

* Bump zha-quirks to 0.0.69
2022-03-31 11:26:27 -04:00
MattWestb
2e9c89024b
Add presets for 2 new tuya TRVs. ()
Adding presets for "_TZE200_cpmgn2cf" and "_TZE200_9sfg7gm0" that is being added in ZHA thru https://github.com/zigpy/zha-device-handlers/pull/1443.
Need being merged for getting the device working then the quirk is being merged (but can being merged before).
2022-03-29 10:45:05 +02:00
rforro
a6d0a4ec64
Update climate.py ()
add TRV presets to all Zonnsmart-like models
2022-03-28 09:56:37 -04:00
rforro
cbdfff25ca
Presets for single ZONNSMART TRV ()
* Presets for single ZONNSMART TRV

* added zonnsmart climate tests

* black8 fix
2022-02-24 08:48:15 -05:00
EtienneMD
ffe821a1f7
Fix HVAC modes for zha Stelpro fan heater () 2022-02-14 23:06:48 +01:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 () 2022-02-05 14:19:37 +01: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
Jacek Kończewski
e03283292b
Add new TRV Beca and proper Presets with new one Temporary Manual () 2022-01-07 18:52:41 +01:00
MattWestb
36d3fb15f7
Fix ZHA unoccupied setpoints. ()
ATTR_UNOCCP_HEAT_SETPT and ATTR_UNOCCP_COOL_SETPT is mixed up. 
Fixing so heating is heating and cooling is colling.
2021-12-14 08:49:00 -05:00
David F. Mulcahey
94324cebea
Update HVAC action handling in ZHA climate devices ()
* Update HVAC action handling in ZHA climate devices

* fix class name

* align with class name changes

* get the correct sensor entity for state assertions
2021-12-12 12:11:37 -05:00
Alexei Chetroi
997809c6c4
Refactor ZHA entity matching process ()
* Group multi-matches by channels

* Group multi-matched by explicit groups

* Registryless AnalogInput and PowerConfiguration

* Refactor single cluster sensor registry

* Refactor single cluster cover and lock registry

* Refactor single cluster binary_sensor registry

* Pylint
2021-12-12 07:52:49 -05: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
MattWestb
d73311075f
Add 2 new CN-Hysen TRVs ()
Adding CN-Hysen "_TZE200_pvvbommb" and "_TZE200_4eeyebrt" TRVs
2021-12-10 14:07:53 -05:00
Alexei Chetroi
4e9fd56b8c
Add 3157100-E model to Centralite thermostat () 2021-12-05 20:36:05 -05:00
MattWestb
2bc0493535
Adding presets for new tuya TRV ()
Adding presets for _TZE200_2atgpdho and _TYST11_2atgpdho and also deleting it for Beca Smart with old Zigbee module then its looks like they is not releasing devices with it.
2021-12-02 13:32:35 -05:00
Marc Mueller
72801867d6
Use assignment expressions 38 () 2021-10-31 18:49:18 +01:00
Marc Mueller
d5116810d4
Use assignment expressions 08 () 2021-10-17 20:02:42 +02:00
Alexei Chetroi
723596076d
Add ZHA HVAC Action sensor ()
* WIP

* Refactor multi-entity matching

Eliminate the notion on primary channel.

* Cleanup climate tests

* Refactor multi-entity match

Remove the "primary channel" in multiple entity matches

* Cleanup

* Add HVAC Action sensor

* Add a "stop_on_match" option for multi entities matches

Nominally working HVAC state sensors

* Add id_suffix for HVAC action sensor

* Fix Zen HVAC action sensor

* Pylint
2021-10-04 12:57:58 -04:00
MattWestb
077131df1a
Update climate.py ()
Adding tuya TRVs type Moes that need extra function in ZHA.
https://github.com/home-assistant/core/issues/49378 adding _TYST11/_TZE200_cwnjrr72 that is missed then being added in zigpy.
https://github.com/zigpy/zha-device-handlers/pull/931 is adding the _TZE200_b6wax7g0 and i shall adding the missed _TYST11_b6wax7g0
2021-06-21 15:36:00 -04:00
Franck Nijhof
f4cc4a0896
Merge of nested IF-IF cases - X-Z () 2021-03-26 17:08:05 +01:00
xonestonex
9739707f62
Preset support for MOES thermostat valves () 2021-03-21 18:03:23 -04:00
Marc Mueller
dcca29ef68
Update typing 14 () 2021-03-18 15:08:35 +01:00
Erik Montnemery
1fc8e32d86
Update integrations t-z to override extra_state_attributes() () 2021-03-11 20:16:26 +01:00
Julien "_FrnchFrgg_" Rivaud
b2bd68a4a0
Avoid arbitrarily reducing ZHA climate temperature information ()
The Zigbee specification mandates that temperatures are given in
1/100ths of degrees, and several devices are able to provide temperature
readings or accept target temperature settings with precision equal or
better than 0.1°C. Yet the ZHA climate entity implementation advertises
an hard-coded precision of 0.5°C.

Avoid arbitrary coarsening by advertising 0.1°C precision, as passing
through the full 0.01°C precision is probably not that useful.
2020-11-21 00:06:50 -05:00
Philip Allgaier
dde6305549
Cleanup unused loggers (components N-Z + tests) () 2020-10-16 21:24:08 -05:00
David F. Mulcahey
d5a03b4d6a
Cleanup async_accept_signal in ZHA () 2020-07-20 07:04:57 -07:00
Alexei Chetroi
47220ae4a6
Handle Centralite Pearl thermostat modes () 2020-06-24 17:52:56 -04:00
Alexei Chetroi
36ed3b1177
Add pi_heating/cooling_demand state attributes () 2020-06-14 00:25:25 -04:00