Skip to content

Commit

Permalink
Merge 2210f11 into 8137b0b
Browse files Browse the repository at this point in the history
  • Loading branch information
wonderslug committed Feb 9, 2019
2 parents 8137b0b + 2210f11 commit 093db82
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions homeassistant/components/august/binary_sensor.py
Expand Up @@ -144,6 +144,13 @@ def update(self):
from august.lock import LockDoorStatus
self._state = self._state == LockDoorStatus.OPEN

@property
def unique_id(self) -> str:
"""Get the unique of the door open binary sensor."""
return '{:s}_{:s}'.format(self._door.device_id,
SENSOR_TYPES_DOOR[self._sensor_type][0]
.lower())


class AugustDoorbellBinarySensor(BinarySensorDevice):
"""Representation of an August binary sensor."""
Expand Down Expand Up @@ -182,3 +189,10 @@ def update(self):
state_provider = SENSOR_TYPES_DOORBELL[self._sensor_type][2]
self._state = state_provider(self._data, self._doorbell)
self._available = self._doorbell.is_online

@property
def unique_id(self) -> str:
"""Get the unique id of the doorbell sensor."""
return '{:s}_{:s}'.format(self._doorbell.device_id,
SENSOR_TYPES_DOORBELL[self._sensor_type][0]
.lower())
5 changes: 5 additions & 0 deletions homeassistant/components/august/camera.py
Expand Up @@ -74,3 +74,8 @@ def camera_image(self):
timeout=self._timeout).content

return self._image_content

@property
def unique_id(self) -> str:
"""Get the unique id of the camera."""
return '{:s}_camera'.format(self._doorbell.device_id)
5 changes: 5 additions & 0 deletions homeassistant/components/august/lock.py
Expand Up @@ -95,3 +95,8 @@ def device_state_attributes(self):
return {
ATTR_BATTERY_LEVEL: self._lock_detail.battery_level,
}

@property
def unique_id(self) -> str:
"""Get the unique id of the lock."""
return '{:s}_lock'.format(self._lock.device_id)

0 comments on commit 093db82

Please sign in to comment.