Commit Graph

236 Commits (8285f42d267cdd799be00a0cafed6bea5454f932)

Author SHA1 Message Date
David F. Mulcahey edaafadde0
Remove ZHA device storage (#74837)
* Remove ZHA device storage

* remove storage file if it exists
2022-07-10 13:46:22 -04:00
Alexei Chetroi 240a83239a
Correctly handle device triggers for missing ZHA devices (#74894) 2022-07-10 13:35:45 -04:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
David F. Mulcahey 269fa14721
Fix bad conditional in ZHA logbook (#74277)
* Fix bad conditional in ZHA logbook

* change syntax
2022-06-30 23:59:35 +03:00
David F. Mulcahey 8bcccb17f9
Fix ZHA events for logbook (#74245) 2022-06-30 10:03:39 -07:00
Arne Mauer fa678d0408
New sensors and manufacturer cluster to support IKEA STARKVIND (with Quirk) (#73450)
* 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 #73629

* 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
J. Nick Koston 4bc5d7bfed
Speed up zha tests (#73627) 2022-06-17 11:41:10 -05:00
Erik Montnemery e3b6c7a66f
Add Home Assistant Yellow integration (#73272)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-06-13 23:25:11 -07:00
David F. Mulcahey a5dc7c5f28
Add logbook describe event support to ZHA (#73077) 2022-06-07 06:49:40 -10:00
Erik Montnemery 5ca82b2d33
Migrate zha light to color_mode (#70970)
* Migrate zha light to color_mode

* Fix restoring color mode

* Correct set operations

* Derive color mode from group members

* Add color mode to color channel

* use Zigpy color mode enum

Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2022-05-27 15:38:22 +02: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
rforro 0c2f22d478
Add configurable zha switch entity (#71784)
* add configurable zha switch entity

* final zha configurable switch

* fix codecov

* replaced errorneous cluster with local quirk

* test fix

* minor changes
2022-05-24 19:43:35 -04:00
David F. Mulcahey 57c94c0350
Add additional configuration entities for ZHA lights (#70597)
* 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
Fairesoimeme 1d63c2069e
Add ZiGate device on automatic integration USB and ZEROCONF (#68577)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-08 18:27:09 -05: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
David F. Mulcahey 27a5851ee2
Fix flaky ZHA tests (#70956) 2022-04-27 14:52:32 -10:00
David F. Mulcahey 361119d5c1
Improve ZHA startup performance (#70111)
* Remove semaphores and background mains init

* additional logging

* correct cache usage and update tests
2022-04-27 08:24:26 -07:00
epenet 8745401af5
Use climate enums in zha (#70754) 2022-04-26 10:09:13 +02:00
David F. Mulcahey 9b8d217b0e
Implement support for start_up_on_off in ZHA (#70110)
* Implement support for start_up_on_off

fix discovery issues

remove cover change

* add tests
2022-04-24 12:50:06 -04:00
glcos 8a73381b56
ZHA ElectricalMeasurement cluster add Frequency and Power Factor (#59417)
* Add files via upload

* Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Add Frequency and PF

Add Frequency and PF

* Update homeassistant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/zha/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Fix rebase

* rebase cleanup

* fix stale doc string

* missed this again

* isort

* update tests

* update discovery test data

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2022-04-24 12:42:52 -04:00
Erik Montnemery 5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Erik Montnemery 64381acbaf
Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
David F. Mulcahey 5f37f58673
Add diagnostics support for ZHA (#69756) 2022-04-11 22:35:29 -07:00
puddly fab1f29a29
Move new `zha_event` command parameters into a `params` key to ensure backwards compatibility (#69631) 2022-04-07 15:33:14 -07:00
puddly 0f6296e4b5
Bump zigpy to 0.44.1 and zha-quirks to 0.0.69 (#68921)
* 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
J. Nick Koston 723dcbafca
Complete fan speed transition from #59781 (#67743) 2022-03-09 10:38:12 +01:00
rforro cbdfff25ca
Presets for single ZONNSMART TRV (#67157)
* Presets for single ZONNSMART TRV

* added zonnsmart climate tests

* black8 fix
2022-02-24 08:48:15 -05:00
Joshua Roys 9134e5c844
Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
epenet 8234625d30
Use Domain not Platform on test service calls (#65508)
* Adjust atag

* adjust broadlink

* Adjust onewire

* Adjust plex

* Adjust renault

* Adjust tasmota

* Adjust zha

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-03 14:16:35 +01:00
rforro 4e376181f5
Expose entity device temperature from cluster in ZHA (#64189)
* expose device temperature sensor in frontend

* fixes after runnig test

* specified device temp channel

* add dev temp int test device aqara water

* black fix
2022-01-23 09:37:01 -05:00
David F. Mulcahey 6a685f0315
Add select entities to ZHA (#62718) 2022-01-04 13:40:29 +01:00
Alexei Chetroi b54f2c9487
Don't throw when a Zigbee device has an unknown ZCL cluster (#62964)
* Fix channel name for clusters with None ep_attribute

* Correctly generate entity name based on channel names
2021-12-28 21:04:11 -05:00
David F. Mulcahey 0062676f61
Add lqi and rssi sensors back to ZHA (#62716)
* update device list

* Only 1 identify button per device

* Add LQI and RSSI sensors to ZHA

* refactor entity creation filter

* update device list and update discover test

* fix reference

* code reduction

* walrus

* parens

* simplify
2021-12-24 16:48:02 -05: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
Ville Skyttä ea58432721
Use DeviceAutomationType in tests/components/[s-z]* (#62450) 2021-12-21 11:56:00 +01:00
David F. Mulcahey 94324cebea
Update HVAC action handling in ZHA climate devices (#61460)
* 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 (#60063)
* 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 abbde8f128
Clean up state class and device class usage in ZHA (#61049)
* Clean up sensor and device class usage in ZHA

* additional cleanup

* Use EntityCategory
2021-12-11 11:51:24 -05:00
David F. Mulcahey a17031630f
Use Platform enum in ZHA (#61016) 2021-12-11 11:06:39 -05:00
David F. Mulcahey 5fd4c37427
Fix missing test assertion in ZHA siren test (#61009) 2021-12-04 13:50:55 -05:00
David F. Mulcahey 02b5449648
Add support for siren entities in ZHA (#60920) 2021-12-03 19:23:57 +01:00
epenet f292691b7b
Use SsdpServiceInfo for ssdp tests (part 3) (#60334)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-25 11:46:20 -06:00
epenet 3bf12fcd29
Use UsbServiceInfo and ZeroconfServiceInfo in zha (#60266)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-24 07:50:45 -06:00
Robin Dupont 4598353315
Add apparent_power for ZHA ElectricalMeasurement (#59857)
* Add apparent_power for ZHA ElectricalMeasurement

* Add apparent_power to REPORT_CONFIG

* update device list with apparent_power attribute

* update test decorators for apparent_power

* remove comments

* Add test for apparent_power in test_sensor
2021-11-18 19:43:08 -05:00
Piotr Majkrzak 80f1e8770a
Add Water Content Measurement clusters (#59300)
* Add Water Content Measurement clusters

* Fix typo

* Add device test

Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2021-11-08 13:13:35 -05:00
David F. Mulcahey dd1154ad08
Bump ZHA quirks version to 0.0.63 (#58478) 2021-10-26 20:22:18 +02:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Alexei Chetroi 723596076d
Add ZHA HVAC Action sensor (#57021)
* 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
Alexei Chetroi d0827a9129
ZHA support for additional entities on ElectricalMeasurement ZCL cluster (#56909)
* Add electrical measurement type state attribute.

* Add active_power_max attribute

* Skip unsupported attributes on entity update

* Fix tests

* Create sensor only if the main attribute is supported

* Refactor ElectricalMeasurement sensor to use attr specific divisor and multiplier

* Multiple entities for electrical measurement cluster

* Update discovery tests

* Sensor clean up

* update tests

* Pylint
2021-10-02 21:57:49 -04:00
Alexei Chetroi dbba2c4afe
Add "Summation Delivered" Sensor for SmartEnergy metering ZHA channel (#56666) 2021-09-29 09:35:20 -07:00