Abode better events (#13809)
* Push abodepy version to 0.13.0 * Bump to 0.13.1. Now uses a cache to store the generated UUID. * Reorganize to not be a dumb dumb.
This commit is contained in:
parent
993866a314
commit
62dc737ea3
2 changed files with 8 additions and 5 deletions
|
@ -19,7 +19,7 @@ from homeassistant.helpers import config_validation as cv
|
|||
from homeassistant.helpers import discovery
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['abodepy==0.12.3']
|
||||
REQUIREMENTS = ['abodepy==0.13.1']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -27,6 +27,7 @@ CONF_ATTRIBUTION = "Data provided by goabode.com"
|
|||
CONF_POLLING = 'polling'
|
||||
|
||||
DOMAIN = 'abode'
|
||||
DEFAULT_CACHEDB = './abodepy_cache.pickle'
|
||||
|
||||
NOTIFICATION_ID = 'abode_notification'
|
||||
NOTIFICATION_TITLE = 'Abode Security Setup'
|
||||
|
@ -87,12 +88,13 @@ ABODE_PLATFORMS = [
|
|||
class AbodeSystem(object):
|
||||
"""Abode System class."""
|
||||
|
||||
def __init__(self, username, password, name, polling, exclude, lights):
|
||||
def __init__(self, username, password, cache,
|
||||
name, polling, exclude, lights):
|
||||
"""Initialize the system."""
|
||||
import abodepy
|
||||
self.abode = abodepy.Abode(
|
||||
username, password, auto_login=True, get_devices=True,
|
||||
get_automations=True)
|
||||
get_automations=True, cache_path=cache)
|
||||
self.name = name
|
||||
self.polling = polling
|
||||
self.exclude = exclude
|
||||
|
@ -129,8 +131,9 @@ def setup(hass, config):
|
|||
lights = conf.get(CONF_LIGHTS)
|
||||
|
||||
try:
|
||||
cache = hass.config.path(DEFAULT_CACHEDB)
|
||||
hass.data[DOMAIN] = AbodeSystem(
|
||||
username, password, name, polling, exclude, lights)
|
||||
username, password, cache, name, polling, exclude, lights)
|
||||
except (AbodeException, ConnectTimeout, HTTPError) as ex:
|
||||
_LOGGER.error("Unable to connect to Abode: %s", str(ex))
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ WazeRouteCalculator==0.5
|
|||
YesssSMS==0.1.1b3
|
||||
|
||||
# homeassistant.components.abode
|
||||
abodepy==0.12.3
|
||||
abodepy==0.13.1
|
||||
|
||||
# homeassistant.components.media_player.frontier_silicon
|
||||
afsapi==0.0.3
|
||||
|
|
Loading…
Add table
Reference in a new issue