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:
parent
d06807c634
commit
67c49a7662
12 changed files with 389 additions and 65 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue