From 70d18d369456a17bf606b9f3c5833b3f72da6d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Schr=C3=B6der?= Date: Tue, 19 Feb 2019 17:20:19 +0100 Subject: [PATCH 1/2] Push to pyads 3.0.7 --- homeassistant/components/ads/__init__.py | 8 ++++---- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/ads/__init__.py b/homeassistant/components/ads/__init__.py index 48b5ea21cbcd03..ed7844b1061446 100644 --- a/homeassistant/components/ads/__init__.py +++ b/homeassistant/components/ads/__init__.py @@ -9,7 +9,7 @@ EVENT_HOMEASSISTANT_STOP import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pyads==2.2.6'] +REQUIREMENTS = ['pyads==3.0.7'] _LOGGER = logging.getLogger(__name__) @@ -73,9 +73,9 @@ def setup(hass, config): try: ads = AdsHub(client) - except pyads.pyads.ADSError: + except pyads.ADSError: _LOGGER.error( - "Could not connect to ADS host (netid=%s, port=%s)", net_id, port) + "Could not connect to ADS host (netid=%s, ip=%s, port=%s)", net_id, ip_address, port) return False hass.data[DATA_ADS] = ads @@ -168,7 +168,7 @@ def add_device_notification(self, name, plc_datatype, callback): self._notification_items[hnotify] = NotificationItem( hnotify, huser, name, plc_datatype, callback) - def _device_notification_callback(self, addr, notification, huser): + def _device_notification_callback(self, notification, name): """Handle device notifications.""" contents = notification.contents diff --git a/requirements_all.txt b/requirements_all.txt index b24b99d7e84375..5e52a7581815cf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -916,7 +916,7 @@ pyW800rf32==0.1 # py_noaa==0.3.0 # homeassistant.components.ads -pyads==2.2.6 +pyads==3.0.7 # homeassistant.components.sensor.aftership pyaftership==0.1.2 From 1018ba791b31985b6c34947ef95b50d7c4256b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Schr=C3=B6der?= Date: Tue, 19 Feb 2019 17:32:43 +0100 Subject: [PATCH 2/2] Correct too long line --- homeassistant/components/ads/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/ads/__init__.py b/homeassistant/components/ads/__init__.py index ed7844b1061446..cfd0f37caa0d60 100644 --- a/homeassistant/components/ads/__init__.py +++ b/homeassistant/components/ads/__init__.py @@ -75,7 +75,8 @@ def setup(hass, config): ads = AdsHub(client) except pyads.ADSError: _LOGGER.error( - "Could not connect to ADS host (netid=%s, ip=%s, port=%s)", net_id, ip_address, port) + "Could not connect to ADS host (netid=%s, ip=%s, port=%s)", + net_id, ip_address, port) return False hass.data[DATA_ADS] = ads