From e52ba87af15a2fcbe732d68bfee243996d3e2071 Mon Sep 17 00:00:00 2001 From: Josh Shoemaker Date: Thu, 16 Aug 2018 01:18:29 -0400 Subject: [PATCH] Upgrade aladdin_connect to 0.3 and provide Unique ID (#15986) * Upgrade aladdin_connect to 0.2 and set unique_id * update code to be Python 3.5 compatible --- homeassistant/components/cover/aladdin_connect.py | 7 ++++++- requirements_all.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/cover/aladdin_connect.py b/homeassistant/components/cover/aladdin_connect.py index efaea39bb86..ef1f94d1bcd 100644 --- a/homeassistant/components/cover/aladdin_connect.py +++ b/homeassistant/components/cover/aladdin_connect.py @@ -14,7 +14,7 @@ from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD, STATE_CLOSED, STATE_OPENING, STATE_CLOSING, STATE_OPEN) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['aladdin_connect==0.1'] +REQUIREMENTS = ['aladdin_connect==0.3'] _LOGGER = logging.getLogger(__name__) @@ -79,6 +79,11 @@ class AladdinDevice(CoverDevice): """Flag supported features.""" return SUPPORTED_FEATURES + @property + def unique_id(self): + """Return a unique ID.""" + return '{}-{}'.format(self._device_id, self._number) + @property def name(self): """Return the name of the garage door.""" diff --git a/requirements_all.txt b/requirements_all.txt index f51b801d5c1..f0579eb0ba5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -111,7 +111,7 @@ aiolifx_effects==0.1.2 aiopvapi==1.5.4 # homeassistant.components.cover.aladdin_connect -aladdin_connect==0.1 +aladdin_connect==0.3 # homeassistant.components.alarmdecoder alarmdecoder==1.13.2