Commit Graph

47 Commits (b78e22e01240a843b9df638794111ffd21730316)

Author SHA1 Message Date
Marcel van der Veldt 8e759bb267
Adjust Hue retry logic to changes in the aiohue library (#62665) 2021-12-23 14:04:10 +01:00
Marc Mueller 40b99135e5
Use platform enum (3) [H-L] (#60937)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2021-12-05 17:10:07 -10:00
Marcel van der Veldt e1e6925097
Refactor of Hue integration with full V2 support (#58996)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-11-16 11:59:17 -08:00
J. Nick Koston 10d6247fee
Bump to aiohttp 3.8.0 (#58974) 2021-11-04 10:07:50 -05:00
Ville Skyttä b52c5c82b1
Use http.HTTPStatus in components/[gh]* (#58246) 2021-10-23 20:34:53 +02:00
Paulus Schoutsen 2976bbbbdd
Store Hue bridge in hass.data before setting up platforms (#50703)
* Store bridge in hass.data before setting up platforms

* Self
2021-05-20 09:08:23 +02:00
Paulus Schoutsen 56774a9f63
Hue: unique ID for groups + remote events (#50748) 2021-05-17 08:07:25 -07:00
Paulus Schoutsen 646af533f0
Add support for Hue push updates (#50591) 2021-05-14 13:39:57 -07:00
Paulus Schoutsen 17fc962a87
Bump aiohue to 2.3.0 (#50217)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-07 14:24:47 +02:00
J. Nick Koston a1fdf84dba
Reduce config entry setup/unload boilerplate G-J (#49737) 2021-04-27 16:09:59 +02:00
J. Nick Koston 9222d3e9f9
Ensure hue connection errors are passed to ConfigEntryNotReady (#49674)
- Limits log spam on retry
2021-04-25 16:42:45 -10:00
Paulus Schoutsen 28347e19c5
Fix Hue service being removed on entry reload (#48663) 2021-04-13 09:31:23 -07:00
J. Nick Koston c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Franck Nijhof cc99fd5e32
Fix Hue scene overriding Hue default transition times (#47454) 2021-03-05 09:43:26 -08:00
Keith Lamprecht fcc14933d0
Add transitiontime to hue scene service (#45785) 2021-02-03 15:42:52 +01:00
fnurgel 366006e0aa
Multiple Hue activate scene (#41353) 2020-10-11 21:01:49 +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
Franck Nijhof c89c0d7824
Fix typos in Hue integration (#37597) 2020-07-07 09:33:37 -05:00
Franck Nijhof 53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00
Franck Nijhof 235298a1b2
Add Hue manual bridge config flow + options flow (#37268)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-07-02 14:12:24 +02:00
springstan fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant (#33832) 2020-04-08 23:20:03 +02:00
Paulus Schoutsen 5a56d0ec1d
Catch more Hue errors (#32275) 2020-02-27 12:53:36 -08:00
Paulus Schoutsen 989dd32258
Hue to retry if hub errors out (#31616)
* Respect semaphore

* Add retries when connection reset

* Also catch OSError from aiohttp when authenticating
2020-02-08 13:20:37 -08:00
Paulus Schoutsen 166d770ddd
Update Hue data fetching (#31338)
* Refactor Hue Lights to use DataCoordinator

* Redo how Hue updates data

* Address comments

* Inherit from Entity and remove pylint disable

* Add tests for debounce
2020-01-31 14:47:40 -08:00
Paulus Schoutsen 58b5833d64
Convert Hue to use unique ID (#30000)
* Convert Hue to use unique ID

* Fix normalization

* Store/restore unique ID

* Fix tests
2019-12-16 19:45:09 +01:00
Paulus Schoutsen d851cb6f9e
Add unique ID to config entries (#29806)
* Add unique ID to config entries

* Unload existing entries with same unique ID if flow with unique ID is
finished

* Remove unused exception

* Fix typing

* silence pylint

* Fix tests

* Add unique ID to Hue

* Address typing comment

* Tweaks to comments

* lint
2019-12-16 12:27:43 +01:00
Bram Kragten d91dd68b31 Limit parallel requests to Philips Hue (#29189)
* Limit parallel requests to Philips Hue

* Fix tests

* Remove loop

* Update homeassistant/components/hue/bridge.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>
2019-12-01 13:24:16 -08:00
Bram Kragten 2bdf7fc8f5 Fix Hue linking with non ASCII chars in location (#29213)
* Fix Hue linking with non ASCII chars in location

* Use slugify
2019-11-30 21:33:11 -08:00
Bram Kragten 549e8cf2c5 Hue: Create new config flow when auth is lost (#28204)
* Hue: Create new config flow when auth is lost

* Fix tests

* Fix tests

* Comments

* Lint
2019-10-28 08:45:08 -07:00
Paulus Schoutsen 57ef721d5d
Hue tweak registered device type + discovery exception (#25977)
* Include location name in create user

* Guard against no host in context

* Fix tests and typing
2019-08-16 16:19:00 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
terual bad9ac5395 Fix Hue bridge timeout (#24084)
* Change timeout from 5 seconds to 10 seconds
Underpowered platforms timeout during configuration/discovery of a Hue bridge on a new install. Increasing this timeout fixes this.
2019-05-24 15:55:13 -07:00
Paulus Schoutsen 806903ffe0 Downgrade Hue warning (#24033) 2019-05-22 14:59:16 +02:00
Richard Mitchell 474ac8b09e Add basic support for native Hue sensors (#22598)
* Add basic support for native Hue sensors

* Update coveragerc

* Simplify attributes

* Remove config option

* Refactor and document device-ness and update mechanism

* Entity docstrings

* Remove lingering config for sensors

* Whitespace

* Remove redundant entity ID generation and hass assignment.

* More meaningful variable name.

* Add new 'not-darkness' pseudo-sensor.

* Refactor sensors into separate binary, non-binary, and shared modules.

* formatting

* make linter happy.

* Refactor again, fix update mechanism, and address comments.

* Remove unnecessary assignment

* Small fixes.

* docstring

* Another refactor: only call API once and make testing easier

* Tests & test fixes

* Flake & lint

* Use gather and dispatcher

* Remove unnecessary whitespace change.

* Move component related stuff out of the shared module

* Remove unused remnant of failed approach.

* Increase test coverage

* Don't get too upset if we're already trying to update an entity before it has finished adding

* relative imports
2019-04-17 22:13:03 -07:00
Paulus Schoutsen 6a2da9f9a5
load cleanups (#23112)
* load cleanups

* Remove unused methods

* Allow importing requirements at the top of a file

* Fix test

* Lint

* Install reqs ASAP when loading platforms
2019-04-15 16:45:46 -07:00
Fabian Affolter 3736120c6a
Update file header (#21061)
* Update file header

* Fix lint issue

* Fix lint issue
2019-02-14 16:01:46 +01:00
Paulus Schoutsen 882f5ed079
Don't directly update config entries (#20877)
* Don't directly update config entries

* Use ConfigEntryNotReady

* Fix tests

* Remove old test

* Lint
2019-02-13 20:36:06 -08:00
cdce8p 7f0a50ce31 async_create_task (#17059)
* async_create_task

* Update google.py
2018-10-02 11:03:09 +02:00
Jason Hu f58425dd3c Refactor data entry flow (#15883)
* Refactoring data_entry_flow and config_entry_flow

Move SOURCE_* to config_entries
Change data_entry_flow.FlowManager.async_init() source param default
 to None
Change this first step_id as source or init if source is None
_BaseFlowManagerView pass in SOURCE_USER as default source

* First step of data entry flow decided by _async_create_flow() now

* Lint

* Change helpers.config_entry_flow.DiscoveryFlowHandler default step

* Change FlowManager.async_init source param to context dict param
2018-08-09 13:24:14 +02:00
Paulus Schoutsen ea2ff6aae3
Use async_create_task (#15633)
* Use async_create_task

* Fix test
2018-07-23 14:05:38 +02:00
Ville Skyttä 2f7b79764a More pylint 2 fixes (#15565)
## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-20 11:45:20 +03:00
MizterB 9066ac44fe Philips Hue Scene Activation: Simplified scene lookup logic, improved error handling (#15175)
* Simplified scene lookup logic, improved error handling

* Lint
2018-06-27 15:22:29 -04:00
MizterB 9a87e62e0e Update Hue platform to aiohue 1.5.0, and re-implement logic for duplicate scene names. (#14653) 2018-05-28 10:21:00 -04:00
Paulus Schoutsen f47572d3c0 Allow platform unloading (#13784)
* Allow platform unloading

* Add tests

* Add last test
2018-04-12 14:28:54 +02:00
Paulus Schoutsen 73de749411
Use config entry to setup platforms (#13752)
* Use config entry to setup platforms

* Rename to async_forward_entry

* Add tests

* Catch if platform not exists for entry
2018-04-09 10:09:08 -04:00
Paulus Schoutsen eb763764b3
Fix Hue error logging (#13616) 2018-04-01 09:03:01 -07:00
Paulus Schoutsen 184f2be83e
Convert Hue to always use config entries (#13034) 2018-03-29 20:15:40 -07:00