Added tamper detection to Wink devices. (#6072)

* Added tamper detection to wink devices.
This commit is contained in:
William Scanlon authored and GitHub committed 2017-02-18 23:00:27 -05:00
1 parent 5f095b5126
commit a4318c3125
2 files changed
+30 -16

No files matched your search

@@ -92,13 +92,13 @@ class WinkBinarySensorDevice(WinkDevice, BinarySensorDevice, Entity):
def __init__(self, wink, hass):
"""Initialize the Wink binary sensor."""
super().__init__(wink, hass)
try:
if hasattr(self.wink, 'unit'):
self._unit_of_measurement = self.wink.unit()
except AttributeError:
else:
self._unit_of_measurement = None
try:
if hasattr(self.wink, 'capability'):
self.capability = self.wink.capability()
except AttributeError:
else:
self.capability = None
@property