From aa54761783c04a8e4d1a47bb275344ac93f0a1ca Mon Sep 17 00:00:00 2001 From: elric91 Date: Sun, 11 Feb 2018 17:57:43 +0100 Subject: [PATCH] bump pyzigate to 0.1.2 to handle negative temperatures --- zigate/__init__.py | 2 +- zigate/zigate2hass.py | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/zigate/__init__.py b/zigate/__init__.py index babc6ac..ae9c987 100644 --- a/zigate/__init__.py +++ b/zigate/__init__.py @@ -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' diff --git a/zigate/zigate2hass.py b/zigate/zigate2hass.py index bd175b4..8a7c0f0 100644 --- a/zigate/zigate2hass.py +++ b/zigate/zigate2hass.py @@ -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) @@ -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)