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
This commit is contained in:
Josh Shoemaker 2018-08-16 01:18:29 -04:00 committed by Martin Hjelmare
parent 9cfbd067d3
commit e52ba87af1
2 changed files with 7 additions and 2 deletions

View file

@ -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."""

View file

@ -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