Add config flow for Hue (#12830)

* Add config flow for Hue

* Upgrade to aiohue 0.2

* Fix tests

* Add tests

* Add aiohue to test requirements

* Bump aiohue dependency

* Lint

* Lint

* Fix aiohttp mock

* Lint

* Fix tests
This commit is contained in:
Paulus Schoutsen
2018-03-03 21:28:04 -08:00
committed by GitHub
parent d06807c634
commit 67c49a7662
12 changed files with 389 additions and 65 deletions

View File

@@ -219,7 +219,8 @@ class SpcWebGateway:
url = self._build_url(resource)
try:
_LOGGER.debug("Attempting to retrieve SPC data from %s", url)
session = aiohttp.ClientSession()
session = \
self._hass.helpers.aiohttp_client.async_get_clientsession()
with async_timeout.timeout(10, loop=self._hass.loop):
action = session.get if use_get else session.put
response = yield from action(url)