Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
Fixing HMW-IO-12-Sw14-DR
Browse files Browse the repository at this point in the history
Fixing HMW-IO-12-Sw14-DR
  • Loading branch information
danielperna84 authored Jan 22, 2017
1 parent bc18d89 commit 6dba8d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pyhomematic/devicetypes/actors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -192,15 +192,15 @@ 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:
# We add the frequency channels to self._fic
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:
Expand Down
4 changes: 2 additions & 2 deletions pyhomematic/devicetypes/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6dba8d8

Please sign in to comment.