From 6dba8d858ca06a779b202cc2bf7727b0cfb7322b Mon Sep 17 00:00:00 2001 From: Daniel Perna Date: Sun, 22 Jan 2017 13:39:26 +0100 Subject: [PATCH] Fixing HMW-IO-12-Sw14-DR Fixing HMW-IO-12-Sw14-DR --- pyhomematic/devicetypes/actors.py | 6 +++--- pyhomematic/devicetypes/generic.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyhomematic/devicetypes/actors.py b/pyhomematic/devicetypes/actors.py index d1fe324e6..64f189f46 100644 --- a/pyhomematic/devicetypes/actors.py +++ b/pyhomematic/devicetypes/actors.py @@ -183,7 +183,7 @@ def __init__(self, device_description, proxy, resolveparamsets=False): super().__init__(device_description, proxy, resolveparamsets) # Need to know the operational mode to return digital switch channels with ELEMENT-property for chan in self._daoc: - if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER", "BEHAVIOUR") == 1: + if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER").get("BEHAVIOUR", None) == 1: # We add the digital channels to self._doc self._doc.append(chan) else: @@ -192,7 +192,7 @@ def __init__(self, device_description, proxy, resolveparamsets=False): # We also want to know how the inputs are configured for chan in self._dfic: - if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER", "BEHAVIOUR") == 1: + if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER").get("BEHAVIOUR", None) == 1: # We add the digital channels to self._dic self._dic.append(chan) else: @@ -200,7 +200,7 @@ def __init__(self, device_description, proxy, resolveparamsets=False): self._fic.append(chan) for chan in self._daic: - if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER", "BEHAVIOUR") == 1: + if self._proxy.getParamset("%s:%i" % (self._ADDRESS, chan), "MASTER").get("BEHAVIOUR", None) == 1: # We add the digital channels to self._dic self._dic.append(chan) else: diff --git a/pyhomematic/devicetypes/generic.py b/pyhomematic/devicetypes/generic.py index 12a693297..1eed5302e 100644 --- a/pyhomematic/devicetypes/generic.py +++ b/pyhomematic/devicetypes/generic.py @@ -177,7 +177,7 @@ def setValue(self, key, value): """ Some devices allow to directly set values to perform a specific task. """ - LOG.debug("HMGeneric.setValue: key = '%s' value = '%s'" % (key, value)) + LOG.debug("HMGeneric.setValue: address = '%s', key = '%s' value = '%s'" % (self._ADDRESS, key, value)) try: self._proxy.setValue(self._ADDRESS, key, value) return True @@ -190,7 +190,7 @@ def getValue(self, key): """ Some devices allow to directly get values for specific parameters. """ - LOG.debug("HMGeneric.getValue: key = '%s'" % key) + LOG.debug("HMGeneric.getValue: address = '%s', key = '%s'" % (self._ADDRESS, key)) try: returnvalue = self._proxy.getValue(self._ADDRESS, key) return returnvalue