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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 389 additions and 65 deletions

View file

@ -35,14 +35,7 @@ def async_get_clientsession(hass, verify_ssl=True):
key = DATA_CLIENTSESSION_NOTVERIFY
if key not in hass.data:
connector = _async_get_connector(hass, verify_ssl)
clientsession = aiohttp.ClientSession(
loop=hass.loop,
connector=connector,
headers={USER_AGENT: SERVER_SOFTWARE}
)
_async_register_clientsession_shutdown(hass, clientsession)
hass.data[key] = clientsession
hass.data[key] = async_create_clientsession(hass, verify_ssl)
return hass.data[key]