Wink AC and addidtional sensor support (#5670)

* Added door bell sensors

* Initial support for AC units.

* Added new device service

* Quirky Aros AC unit support

* Use super() everywhere and error checking for token request.

* Ignore camera sensors during setup of alarms.

* Added manufacturer/device attributes to all wink devices.

* Fixed style errors

* Fixed remaining lint errors.
This commit is contained in:
William Scanlon authored and Paulus Schoutsen committed 2017-02-01 22:43:12 -08:00
1 parent b5f285a789
commit 80a794e587
11 files changed
+361 -88

No files matched your search

+6 -3
View File
@@ -6,7 +6,7 @@ https://home-assistant.io/components/lock.wink/
"""
from homeassistant.components.lock import LockDevice
from homeassistant.components.wink import WinkDevice
from homeassistant.components.wink import WinkDevice, DOMAIN
DEPENDENCIES = ['wink']
@@ -15,7 +15,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Wink platform."""
import pywink
add_devices(WinkLockDevice(lock, hass) for lock in pywink.get_locks())
for lock in pywink.get_locks():
_id = lock.object_id + lock.name()
if _id not in hass.data[DOMAIN]['unique_ids']:
add_devices([WinkLockDevice(lock, hass)])
class WinkLockDevice(WinkDevice, LockDevice):
@@ -23,7 +26,7 @@ class WinkLockDevice(WinkDevice, LockDevice):
def __init__(self, wink, hass):
"""Initialize the lock."""
WinkDevice.__init__(self, wink, hass)
super().__init__(wink, hass)
@property
def is_locked(self):