Added tamper detection to Wink devices. (#6072)
* Added tamper detection to wink devices.
This commit is contained in:
parent
5f095b5126
commit
a4318c3125
2 changed files with 30 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue