Skip to content

Commit

Permalink
bump pyzigate to 0.1.2 to handle negative temperatures
Browse files Browse the repository at this point in the history
  • Loading branch information
elric91 committed Feb 11, 2018
1 parent b55ba55 commit aa54761
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion zigate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import voluptuous as vol
from functools import partial

REQUIREMENTS = ['pyserial-asyncio==0.4', 'pyzigate==0.1.1']
REQUIREMENTS = ['pyserial-asyncio==0.4', 'pyzigate==0.1.2']

DOMAIN = 'zigate'

Expand Down
12 changes: 4 additions & 8 deletions zigate/zigate2hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ZiGate2HASS(ZiGate):

def __init__(self, hass):
super().__init__()
self.hass = hass
self._hass = hass

def set_device_property(self, addr, endpoint, property_id, property_data):
# decoding the address to assign the proper signal (bytes --> str)
Expand All @@ -46,21 +46,17 @@ def set_device_property(self, addr, endpoint, property_id, property_data):
_LOGGER.debug('- Signal : {}'.format(addrep))
_LOGGER.debug('- Property : {}'.format(property_id))
_LOGGER.debug('- Data : {}'.format(property_data))
dispatcher_send(self.hass, addrep, property_id, property_data)
dispatcher_send(self._hass, addrep, property_id, property_data)

def set_external_command(self, cmd, **msg):
if cmd == ZGT_CMD_NEW_DEVICE:
addr = msg['addr']
persistent_notification.async_create(self.hass, 'New device {} paired !'.
persistent_notification.async_create(self._hass, 'New device {} paired !'.
format(addr),
title='Zigate Breaking News !')
# requesting endpoint list
#print('endpoint list for {}'.format(addr))
#self.hass.services.async_call(DOMAIN, 'raw_command',
# {'cmd':'0045', 'data':addr})
elif cmd == ZGT_CMD_LIST_ENDPOINTS:
ep_list = '\n'.join(msg['endpoints'])
title = 'Endpoint list for device {} :'.format(msg['addr'])
persistent_notification.async_create(self.hass, ep_list, title=title)
persistent_notification.async_create(self._hass, ep_list, title=title)


0 comments on commit aa54761

Please sign in to comment.