Skip to content

Commit

Permalink
Merge pull request #8 from therealryanbonham/connection_handling
Browse files Browse the repository at this point in the history
Connection handling
  • Loading branch information
therealryanbonham authored Jun 30, 2020
2 parents f074c71 + 744dea2 commit cbe31a9
Show file tree
Hide file tree
Showing 8 changed files with 534 additions and 515 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,8 @@ manifest.json
sensor.py

venv/
.mypy_cache/
.mypy_cache/


#Ignore tests as they are currently integration test and not ready for CI
tests/
17 changes: 9 additions & 8 deletions custom_components/badnest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
from homeassistant.helpers import config_validation as cv

from .api import NestAPI
from .const import DOMAIN, CONF_ISSUE_TOKEN, CONF_COOKIE, CONF_USER_ID, CONF_ACCESS_TOKEN, CONF_REGION
from .const import (
DOMAIN,
CONF_ISSUE_TOKEN,
CONF_COOKIE,
CONF_USER_ID,
CONF_ACCESS_TOKEN,
CONF_REGION,
)

CONFIG_SCHEMA = vol.Schema(
{
Expand Down Expand Up @@ -40,13 +47,7 @@ def setup(hass, config):
region = None

hass.data[DOMAIN] = {
'api': NestAPI(
user_id,
access_token,
issue_token,
cookie,
region,
),
"api": NestAPI(user_id, access_token, issue_token, cookie, region,),
}

return True
Loading

0 comments on commit cbe31a9

Please sign in to comment.