Skip to content

Commit

Permalink
Merge pull request #28 from max5962/master
Browse files Browse the repository at this point in the history
use two sets, one with short addr, on with full addr
  • Loading branch information
elric91 committed Jul 3, 2018
2 parents 0bda643 + 44ba171 commit 329f19c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zigate/zigate2hass.py
Expand Up @@ -35,6 +35,7 @@ def __init__(self, hass):
super().__init__()
self._hass = hass
self._known_devices = set()
self._known_devices_full = set()

def set_device_property(self, addr, endpoint, property_id, property_data):
# decoding the address to assign the proper signal (bytes --> str)
Expand Down Expand Up @@ -62,5 +63,6 @@ def set_external_command(self, cmd, **msg):
persistent_notification.async_create(self._hass, ep_list, title=title)

def add_known_device(self, device_address):
self._known_devices.add(device_address[:6])
self._known_devices_full.add(device_address[:6])
self._known_devices.add(device_address[:4])

0 comments on commit 329f19c

Please sign in to comment.