Commit Graph

277 Commits (6b85d17e7c0d1e2b89c958d575eacabb4e3ff756)

Author SHA1 Message Date
Erik Montnemery be7e76f302
Migrate ZHA when enabling multi-PAN support on HA Yellow (#82213)
* Migrate ZHA when enabling multi-PAN support on HA Yellow

* Refactor BaseZhaFlow.async_step_maybe_confirm_ezsp_restore

* Change data passed to ZHA to initiate migration

* Catch errors during ZHA migration

* Fix ZhaMigrationHelper.async_prepare_yellow_migration return value

* Improve test coverage

* Improve test coverage

* Fix spelling

* Rename some none HA yellow specifics

* Rename again

* Increase number of migration retries + refactor

* Suppress OperationNotAllowed when reloading

* Adjust tests
2022-11-22 11:17:23 +01:00
puddly dfed57ed4d
Bump ZHA dependencies (#82509)
* Bump ZHA dependencies

* Use the corrected `TypeValue` keyword argument name in unit tests
2022-11-21 19:39:34 -05:00
Erik Montnemery bb64b39d0e
Minor refactor of zha config flow (#82200)
* Minor refactor of zha config flow

* Move ZhaRadioManager to a separate module
2022-11-16 17:13:23 +01:00
David F. Mulcahey ebffe0f33b
Fix ZHA configuration APIs (#81874)
* Fix ZHA configuration loading and saving issues

* add tests
2022-11-13 08:30:16 -05:00
puddly 74357bef15
Use a unique ID for the Yellow ZHA hardware discovery (#81523)
* Set unique ID for hardware discovery

* Use the provided `name` for discovered hardware
2022-11-07 11:28:28 -05:00
David F. Mulcahey d1fd141e8c
Bump ZHA quirks and associated changes (#81587) 2022-11-07 12:28:59 +01:00
David F. Mulcahey 83c6a7e18b
Fix invalid min and max color temp in bad ZHA light devices (#81604)
* Fix ZHA default color temps

* update test
2022-11-05 08:40:28 -04:00
puddly b8edc86500
Handle sending ZCL commands with empty bitmap options (#81051)
Handle sending commands with empty bitmaps
2022-10-26 21:29:48 -04:00
Julian Löhr 6795627734
Add ZHA StartUpColorTemperature configuration entity (#80853)
* 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 b4a203c3c7
Add friendly name to ZHA identify button (#80446) 2022-10-16 19:57:24 -04:00
David F. Mulcahey d75e449c52
Add ability to convert ZCL schemas to vol schemas to ZHA (#79908)
* try serializing cluster command schemas

* use min and max value from zigpy type

* different type assignments

* initial command execution changes

* cleanup

* cleanup and typing

* typing

* typing

* add tests

* mypy

* handle raw values too

* check for None responses

* make backwards compatible

* update yaml for svc change
2022-10-14 08:15:10 -04:00
David F. Mulcahey 20d71a869e
Add friendly entity names for ZHA sensors (#80035)
* Add friendly entity names for ZHA sensors

* lowercase 2nd word
2022-10-10 15:40:42 -04:00
TheJulianJES 3126762707
Add friendly name to ZHA config entities (#79926)
* 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
puddly 2dab9073fe
ZHA radio migration: reset the old adapter (#79663) 2022-10-06 14:02:24 -04:00
David F. Mulcahey 2ed48a9b28
Add configuration entities and device actions for Inovelli Blue Series switch to ZHA (#79106)
* 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 0d696b84b2
Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00
epenet 4f31f28e67
Cleanup SourceType in tests (#78809) 2022-09-20 10:50:07 -04: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
epenet e9f55f4e54
Apply hass-relative-import to tests (s-z) (#78733) 2022-09-19 09:51:31 +02:00
David F. Mulcahey 9d47160e68
Fix sengled bulbs in ZHA (#78315)
* Fix sengled bulbs in ZHA

* fix tests

* update discovery data
2022-09-12 15:37:11 -04:00
puddly f19af72895
Bump ZHA dependencies (#78201) 2022-09-10 13:56:01 -04:00
puddly 4076f8b94e
Fix ZHA lighting initial hue/saturation attribute read (#77727)
* Handle the case of `current_hue` being `None`

* WIP unit tests
2022-09-07 11:10:24 -04:00
puddly 73e26b71b1
Migrate ZHA lighting to use newer zigpy ZCL request syntax (#77676)
* Migrate unit test to use more command definition constants

* Use keyword argument syntax for sending ZCL requests

* Ensure all ZHA unit tests pass
2022-09-01 15:32:32 -04:00
puddly f8fc90bc07
Add ZHA config flow single instance checks for zeroconf and hardware (#77612) 2022-08-31 12:41:41 -04:00
puddly 4b24370549
ZHA Yellow config flow fixes (#77603) 2022-08-31 11:21:37 -04:00
puddly f78b39bdbf
ZHA backup/restore config flow (#77044) 2022-08-30 12:40:16 -04:00
puddly 2e8d598795
Allow ZHA startup to fail instead of raising `ConfigEntryNotReady` (#77417)
* Retry startup within ZHA instead of raising `ConfigEntryNotReady`

* Add unit tests

* Disable pylint warning for intentional broad except
2022-08-29 11:42:01 -04:00
Erik Montnemery 6d49362573
Revert rename of confirm step in zha config flow (#77010)
* Revert rename of confirm step in zha config flow

* Update tests
2022-08-19 09:33:57 +02:00
Erik Montnemery bb74730e96
Add support for USB dongles to the hardware integration (#76795)
* Add support for USB dongles to the hardware integration

* Update hardware integrations

* Adjust tests

* Add USB discovery for SkyConnect 1.0

* Improve test coverage

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Fix frozen dataclass shizzle

* Adjust test

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-08-18 21:52:12 +02:00
Erik Montnemery 21ebd1f612
Simplify ZHA config entry title (#76991) 2022-08-18 10:58:44 -04:00
Erik Montnemery 88a5b90489
Minor improvement of zha test (#76993) 2022-08-18 16:52:41 +02:00
David F. Mulcahey 3937ac2ca3
Track code coverage for ZHA sensor entities (#76617)
* Track code coverage for ZHA sensor entities

* remove correct entry
2022-08-11 21:13:27 -04:00
puddly 8e2f0497ce
ZHA network backup and restore API (#75791)
* Implement WS API endpoints for zigpy backups

* Implement backup restoration

* Display error messages caused by invalid backup JSON

* Indicate to the frontend when a backup is incomplete

* Perform a coordinator backup before HA performs a backup

* Fix `backup.async_post_backup` docstring

* Rename `data` to `backup` in restore command

* Add unit tests for new websocket APIs

* Unit test backup platform

* Move code to overwrite EZSP EUI64 into ZHA

* Include the radio type in the network settings API response
2022-07-28 11:24:31 -04:00
TheJulianJES 129b42cd23
Fix ZHA light brightness jumping around during transitions (#74849)
* Moved color commands to a new ``async_handle_color_commands`` method

* Fixed tests

* Fix brightness jumping around during transitions

* Add config option to disable "Enhanced brightness slider during light transition"
2022-07-26 20:03:17 -04:00
TheJulianJES b8ae883f18
Set min transition time for Sengled lights in ZHA groups (#75644)
* Set min transition time for Sengled lights in ZHA groups

* Change test to expect correct min transition time for group with Sengled light

* Fix turn_off with transition 0 for Sengled lights
2022-07-25 08:13:01 -04:00
TheJulianJES 975378ba44
Add ZHA config option for "enhanced light transition from an off-state" (#75151)
* Add ZHA config option for "enhanced light transition from an off-state"

* Default option to disabled

* Always disable "enhanced light transition" for ZHA LightGroups

* Rename _enhanced_light_transition to _zha_config_enhanced_light_transition

* Remove LightGroup check, as config option always disables for groups

* Remove duplicated line

* Remove duplicated line

* Move ZHA config transition line below other config line

* Renamed comments of renamed variable in tests
color_provided_while_off -> new_color_provided_while_off

* Enable "enhanced light transitions" for testing
2022-07-21 19:46:16 -04:00
David F. Mulcahey 04c6b9c519
ZHA light entity cleanup (#75573)
* use base class attributes

* initial hue and saturation support

* spec is 65536 not 65535

* fixes

* enhanced current hue

* fix comparison

* clean up

* fix channel test

* oops

* report enhanced current hue
2022-07-21 17:54:50 -04:00
David F. Mulcahey 6f5e4ca503
Fix ZHA light turn on issues (#75220)
* rename variable

* default transition is for color commands not level

* no extra command for groups

* don't transition color change when light off -> on

* clean up

* update condition

* fix condition again...

* simplify

* simplify

* missed one

* rename

* simplify

* rename

* tests

* color_provided_while_off with no changes

* fix missing flag clear

* more tests for transition scenarios

* add to comment

* fix comment

* don't transition when force on is set

* stale comment

* dont transition when colors don't change

* remove extra line

* remove debug print :)

* fix colors

* restore color to 65535 until investigated
2022-07-18 10:20:49 -04:00
puddly 2986a2f01b
Identify the active ZHA coordinator device in API responses (#74739)
* Remove deprecated zigpy properties

* Create a `ZHADevice.is_active_coordinator` property

* Add `@puddly` to the ZHA code owners

* Create a `ZHAGateway.coordinator_ieee` shortcut property
2022-07-11 14:19:30 -04:00
David F. Mulcahey 6f28e4bfee
Migrate ZHA to new entity naming standard (#74846) 2022-07-10 13:17:59 -07:00
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