Commit graph

68 commits

Author SHA1 Message Date
Robert Svensson
cc7a0e3c24
Streamline setup of deCONZ sensor platform (#71905) 2022-05-23 15:41:56 +02:00
Robert Svensson
007c6d2236
Streamline setup of deCONZ binary sensor platform (#71820) 2022-05-17 00:04:57 +02:00
Robert Svensson
bed2d1e37b
Streamline setup of deCONZ climate platform (#71708) 2022-05-13 09:51:19 +02:00
Robert Svensson
e1f4b17971
Pydeconz raise ResponseError when deCONZ Rest API Plugin is not yet ready (#71078) 2022-04-29 23:55:55 +03:00
Robert Svensson
fe3fb230be
Streamline setup of deCONZ group platform (#70712) 2022-04-26 11:44:47 +02:00
Robert Svensson
f7d9797c62
Streamline setup of deCONZ scene platform (#70700) 2022-04-26 11:42:56 +02:00
Robert Svensson
790beb1346
Move deCONZ light imports to reflect changes in pydeconz (#70469) 2022-04-24 10:27:56 +02:00
Robert Svensson
009111151d
Move deCONZ alarm system imports to reflect the changes in pydeconz (#70453) 2022-04-24 10:17:46 +02:00
Robert Svensson
83fde83279
Move deCONZ group and scene imports to reflect the changes in pydeconz (#70468)
* Move deCONZ scene imports to reflect the changes in pydeconz

* Move deCONZ group imports to reflect the changes in pydeconz

* Use common resourcegroup rather than 5 different imports in gateway
2022-04-24 10:09:58 +02:00
Robert Svensson
301dcaae63
Move deCONZ sensor imports to reflect changes in pydeconz (#70471) 2022-04-23 22:59:51 +03:00
Robert Svensson
e996142592
Improve typing of deCONZ gateway (#69459)
* Improve typing of deCONZ gateway
* Fix review comments
2022-04-11 09:13:25 +02:00
Robert Svensson
d6d7f3cb3c
Bump pydeconz to v88 (#69369) 2022-04-05 13:44:04 -07:00
Robert Svensson
6526b4eae5
Add typing to deconz_device (#67501) 2022-03-11 20:35:25 -08:00
Robert Svensson
dd88a05cb4
Make type checking pass for deCONZ init, gateway and services (#66054)
* Type and enable type checking for init, config_flow, diagnostics, gateway and services

* Fix import

* Fix review comment
2022-02-23 13:10:35 +01:00
epenet
a63e5c7ded
Add type hints for config entry update listeners (#65412) 2022-02-02 03:36:04 -06:00
Robert Svensson
3258f66097
Expose deCONZ configuration url from discovered entry (#64519) 2022-01-20 13:46:22 +01:00
Ville Skyttä
39691faccc
Use DeviceEntryType in non-typechecked code too (#58646) 2021-11-23 10:04:33 +01:00
Robert Svensson
2ca874a15c
Add configuration_url to deCONZ device when entry source is addon (#59598) 2021-11-14 11:49:02 +01:00
J. Nick Koston
10d6247fee
Bump to aiohttp 3.8.0 (#58974) 2021-11-04 10:07:50 -05:00
Robert Svensson
ab7a34fc71
Add support for device configuration URL to deCONZ gateway (#58184) 2021-10-22 19:41:49 +02:00
Robert Svensson
3ad3f4e2ba
Simplify signalling for updating available property of deCONZ entities (#58078) 2021-10-20 14:59:36 +02:00
Robert Svensson
25f4f2d86e
Don't use deprecated methods of retrieving registries in deCONZ (#58081) 2021-10-20 11:16:28 +02:00
Robert Svensson
750dd9186e
Improve deCONZ signal strings (#57140) 2021-10-07 12:48:27 +02:00
Robert Svensson
539ef31046
Reflect changes to pydeconz v84 (#56361)
Mostly snake case conversions and typing
But also a change in retry mechanism
Added a more complete set_* call to most types to remove the direct relation to rest API of deCONZ
2021-09-18 09:05:08 +02:00
Robert Svensson
605f65b75d
Make use of entry id rather than unique id when storing deconz entry in hass.data (#52584)
* Make use of entry id rather than unique id when storing entry in hass data

* Update homeassistant/components/deconz/services.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-06 17:18:54 +02:00
J. Nick Koston
a67b9eff17
Reduce config entry setup/unload boilerplate D-F (#49733) 2021-04-26 20:46:49 -10:00
Robert Svensson
3b64c574e3
Replace local listener implementation to using config_entry.on_unload in deCONZ (#49494) 2021-04-20 08:20:57 -10:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
Quentame
198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Robert Svensson
57fa7f926a
Introduce reauth flow to deCONZ (#45443) 2021-01-22 23:37:16 +01:00
Robert Svensson
bc83e30761
Fix device refresh service can always add devices (#43950) 2020-12-05 11:53:43 +01:00
Robert Svensson
ac2c01d20c
deCONZ improve options updating entities (#42320) 2020-12-02 16:21:27 +01:00
Robert Svensson
55cbd5aa0d
Track deCONZ lib changes to light based devices (#43366)
* Improve control of covers

* Log backtrace if available

* Do not create entity for controller tool
Binary sensor should use state rather than is_tripped
Add some more tests to lights and sensors

* Bump dependency to v74

* Fix Balloobs comments
2020-11-23 11:37:11 +01:00
Robert Svensson
c6c617ed31
Improve device registry for host and deCONZ service (#41786) 2020-10-17 11:44:23 -05:00
Robert Svensson
85ccff28cd
Revert partial changes to deCONZ integration from earlier PR (#41943) 2020-10-16 14:38:12 +02:00
Robert Svensson
9d56d3bb31
Add deCONZ service to clean up orphaned device and entity entries (#40629)
* Add service that can clean up by deCONZ orphaned entries from device and entity registry

* Fix existing tests

* Add new test

* Add some inline comment to the service
2020-09-30 20:11:41 +02:00
Robert Svensson
082f866620
Improve deCONZ state updates (#40601) 2020-09-30 17:24:30 +02:00
Robert Svensson
7e58bfe01d
Add deconz option to disable automatic addition of new devices (#40545)
* Allow disabling automatic additions of new devices from deconz

* Fix black

* Fix review comment

* Remove assertion

* Verify entity registry is empty
2020-09-29 11:07:19 +02:00
Robert Svensson
66a8edb11e
deCONZ fix comments from #40265 (#40640)
* Use set not list

* Events are not entities

* Don't await unload_events

* Remove checks of entities content in tests

* List to set comprehension

* Why is it so hard to remember that sets arent parenthesis...
2020-09-27 11:02:45 +02:00
Robert Svensson
203c556ba3
Improve tracking of existing entities in deconz (#40265)
* Store all entities in dict

* Use stored unique id to select if to create entity or not

* Remove unnecessary init

* Change so same physical sensor doesnt try to create multiple battery sensors
Change so groups get created properly

* Add controls in tests that entities are logged correctly
2020-09-25 22:49:28 +02:00
Robert Svensson
fb7fb0ea78
deCONZ - move event handling (#40424)
* Working draft

* Remove event references in sensor
2020-09-22 19:55:10 +02:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Paulus Schoutsen
3dc79aa60a
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2020-08-19 14:57:38 +02:00
Eugenio Panadero
f2f03cf552
Fix deconz tests that have uncaught exceptions (#33462) 2020-03-31 11:19:34 -05:00
springstan
9801810552
Use f-strings in integrations starting with "B"-"E" (#32121)
* Use f-strings in integrations starting with B

* Use f-strings in integrations starting with C

* Use f-strings in integrations starting with D

* Use f-strings in integrations starting with E

* Fix pylint errors

* Fix pylint errors v2

* Fix tests

* Fix tests v2
2020-02-24 08:47:52 -08:00
Robert Svensson
b5df2ba853
deCONZ - Directly reflect changes to config entry options (#31661)
* Directly reflect changes to config entry options

* Remove print

* Add tests

* Add title to config options
2020-02-18 13:24:25 -08:00
Robert Svensson
fce9697591
deCONZ - Revert from using disabled_by when setting options (#31446)
* Revert from using disabled_by when setting options

* Remove signalling for changed options

* Evaluate allow group option earlier when adding a group
2020-02-04 16:37:01 -08:00
Robert Svensson
43b11f6b39
deCONZ - Improve config flow logging (#31381) 2020-02-01 20:02:57 +01:00
Robert Svensson
0a4f3ec1ec Use config entry unique id for deCONZ (#30122)
* Use config entry unique id

* Clean up

* Backwards compatiblity note

* Fix some of Balloobs comments

* Bump dependency to v66

* Black somehow missed config flow tests...

* Move set unique ID til after possibility to update existing entry
2020-01-03 11:50:53 +01:00
Robert Svensson
57a3f7d5c8
Pass in parameters explicitly to DeconzSession (#29617)
Dont pass in loop to DeconzSession
Services will use new refresh state method
2019-12-08 16:53:34 +01:00