Commit Graph
56 Commits
Author SHA1 Message Date
Aaron Bach 6a801fc058 Remove no-longer-needed invalid API key monitor for OpenUV (#85573)
* Remove no-longer-needed invalid API key monitor for OpenUV

* Handle re-auth cancellation

* Use automatic API status check
2023-01-10 09:48:39 +01:00
Aaron Bach 45be2a260e Add re-auth flow for OpenUV (#79691) 2022-11-08 07:41:09 -07:00
Aaron Bach 4e8e53f357 Remove previously-deprecated OpenUV services (#81055) 2022-10-27 10:22:44 +02:00
Aaron Bach e40db797c5 Remove redundant async_update for OpenUV entities (#80735) 2022-10-21 14:08:37 -06:00
Aaron Bach 60b3d6816b Replace custom OpenUV data object with coordinators (#80705)
* Replace custom OpenUV data object with coordinators

* Typing

* Code review
2022-10-20 19:37:20 -06:00
Aaron Bach a282e41d68 Revert unintended OpenUV unique ID change (#78691) 2022-09-18 09:24:13 -06:00
ca5a9c9456 Allow multiple instances of OpenUV via the homeassistant.update_entity service (#76878)
* Allow for multiple instances of the OpenUV integration

* Docstring

* Remove Repairs

* Fix tests

* Slightly faster OpenUV object lookup

* Entity update service

* Remove service descriptions

* hassfest

* Simplify strings

* Don't add UI instructions to Repairs item

* Add a throttle to entity update

* Update homeassistant/components/openuv/__init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Switch from Throttle to Debouncer(s)

* Keep dispatcher for services

* Reduce change surface area

* Duplicate method

* Add issue registry through helper

* Update deprecation version

* Use config entry selector

* Remove device/service info

* Remove commented out method

* Correct entity IDs and better verbiage

* Fix tests

* Handle missing config entry ID in service calls

* Remove unhelpful comment

* Remove unused constants

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-17 17:56:45 -06:00
Aaron Bach b4e5c95e03 Migrate OpenUV to new entity naming style (#74919) 2022-07-10 22:45:09 +02:00
J. Nick Koston cd03c49fc2 Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
Aaron Bach 75e5079df3 Catch correct error during OpenUV startup (#65459) 2022-02-02 17:05:40 -08:00
Aaron Bach a70c980283 Fix small inconsistency in OpenUV data storage (#64717) 2022-01-22 14:27:12 -07:00
Aaron BachandMartin Hjelmare fed18fe142 Replace OpenUV logged errors with HomeAssistantError in service handlers (#62349)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-19 23:02:51 +01:00
Marc Mueller e0cb33a0a1 Use platform enum (4) [M-O] (#60940) 2021-12-05 17:06:35 -10:00
Aaron Bach dedc4a8285 Prevent OpenUV from blocking other integrations' startup (#59956)
* Prevent OpenUV from blocking other integrations' startup

* Comment
2021-11-19 13:53:47 -07:00
Aaron Bach 198b18dd00 Perform some OpenUV code cleanup (#58864) 2021-11-14 19:06:27 +01:00
Aaron Bach fd49da37b8 Make sure OpenUV data storage conforms to standards (#57813) 2021-10-16 23:59:19 -06:00
Aaron Bach 25253f2b7a Use current config entry standards for OpenUV (#57137) 2021-10-05 15:03:39 -06:00
Aaron Bach 80c97a2416 Remove injected logger in Ambient PWS and OpenUV (#56920)
* Remove injected log in OpenUV

* Add Ambient
2021-10-02 10:45:33 -06:00
Aaron Bach 46f05ca279 Bump pyopenuv to 2.2.0 (#55464) 2021-08-30 13:12:27 -07:00
2271f3b5f9 Clean up usage of EntityDescription in OpenUV (#55127)
* Clean up usage of EntityDescription in OpenUV

* Remove redundant typing

* Code review

* Update homeassistant/components/openuv/__init__.py

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

* Black

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-08-25 14:18:53 +02:00
Aaron Bach 24d017f974 Add ability to configure OpenUV "protection window" UV indices (#54562) 2021-08-24 15:37:50 -05:00
Aaron Bach 10551743d6 Bump pyopenuv to 2.1.0 (#54436) 2021-08-10 20:28:03 -07:00
Franck Nijhof d4c4263730 Adjust typing of _attr_extra_state_attributes (#53529) 2021-07-27 01:25:22 +02:00
Aaron Bach 54ace4cdd4 Enforce strict typing for OpenUV (#53409)
* Enforce strict typing for OpenUV

* Linting

* Fix tests
2021-07-24 14:50:01 +02:00
Marc Mueller f6b162bc39 Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
Aaron BachandFranck Nijhof 887753e06d Remove redundant property definitions in OpenUV (#52379)
* Remove redundant property definitions in OpenUV

* Update homeassistant/components/openuv/__init__.py

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

* Code review

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-02 09:47:49 +02:00
J. Nick Koston 3f3f77c6e6 Reduce config entry setup/unload boilerplate N-P (#49777) 2021-04-27 20:42:21 +02:00
Erik Montnemery 14a59d290a Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01: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
Aaron BachandFranck Nijhof be39104a36 Re-organize OpenUV constants (#43453)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-11-22 12:50:22 +01: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
Aaron Bach 7071f3a966 Remove deprecated YAML config from OpenUV (#38857) 2020-08-16 19:57:10 -06:00
Aaron BachandPaulus Schoutsen c18ba6aec0 Remove configuration.yaml support for OpenUV (#36148)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-27 15:48:28 -07:00
springstan eae21be5b9 Improve string formatting v6 (#33698) 2020-04-07 23:14:28 +02:00
Aaron Bach f53dfc4308 Don't reinvent callback handler removal logic in several integ… (#33726) 2020-04-05 22:36:23 -07:00
Franck Nijhof e8a0abd107 String formatting improvements (#33635)
* String formatting improvements

* Found another one
2020-04-04 18:21:14 +02:00
Aaron Bach 609263e1bb Add cleanup to OpenUV (#32886)
* Add cleanup to OpenUV

* Linting
2020-03-17 22:03:16 -05:00
Aaron Bach 288574b8d1 Remove monitored conditions from OpenUV (#31019)
* Remove monitored conditions from OpenUV

* Code review comments
2020-01-22 17:48:20 -08:00
Aaron Bach 662c12715e Allow OpenUV entities to be unavailable (#31018)
* Allow OpenUV entities to be unavailable

* Empty commit to re-trigger build
2020-01-20 13:33:58 -07:00
springstan 23fb364076 Move imports to top for openuv (#29541)
* Move imports to top for openuv

* Renamed mock_pyopenuv_ to MockClient in test_config_flow
2019-12-06 14:13:43 -07:00
Aaron Bach fae8cd48c4 Add small speed improvement when unloading OpenUV (#28758) 2019-11-13 14:27:15 -07:00
Franck Nijhof 1c5e0123c9 Use literal string interpolation in integrations N-Q (f-strings) (#26391) 2019-09-03 11:35:00 -07:00
StephenWetzel 16fff16082 Add two new methods to the OpenUV component that consume only a singl… (#26207)
* Add two new methods to the OpenUV component that consume only a single API call

* Two lines after class

* Rename methods to better reflect what they do, and DRY copy and pasted code

* More error handling down into methods, run api calls in parallel

* Fix import order

* Add new methods to services.yaml, and update error messages
2019-08-29 09:56:12 -06:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Aaron Bach 75abfd49ef Fixed unhandled exception in OpenUV data update (#23611) 2019-05-01 21:15:10 -06:00
Aaron Bach 56b08a6ddb Ensure OpenUV service checks permissions (#22668)
* Create decorator to check service permissions

* Ensure OpenUV service has proper user permissions

* Reverting strange changes
2019-04-13 16:50:19 -06:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd30889bad5adc9a4fd60059d05ba5a7.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2cc53cbe6954f940062b18ae34b05621.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Aaron Bach 4ca7273c58 Upgrade pyopenuv to 1.0.9 (#21513) 2019-02-27 17:51:09 -07:00
Fabian Affolter 161c368c9d Update file header (#21054)
* Update file header

* Update __init__.py
2019-02-13 20:35:12 -08:00
Aaron Bach ef79566864 Adjust OpenUV integration for upcoming API limit changes (#19949)
* Adjust OpenUV integration for upcoming API limit changes

* Added fix for "Invalid API Key"

* Bugfix

* Add initial nighttime check

* Move from polling to a service-based model

* Fixed test

* Removed unnecessary scan interval

* Fixed test

* Moving test imports

* Member comments

* Hound

* Removed unused import
2019-01-14 13:12:06 +01:00