From 318e1f383db4ef518630795b956cc7f1e6bce98f Mon Sep 17 00:00:00 2001
From: fhemzap <>
Date: Sun, 18 Sep 2016 16:07:02 +0000
Subject: [PATCH] HMCCU: Bugfix
git-svn-id: https://svn.fhem.de/fhem/trunk@12170 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/CHANGED | 2 ++
fhem/FHEM/88_HMCCUCHN.pm | 8 ++++----
fhem/FHEM/88_HMCCUDEV.pm | 6 +++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/fhem/CHANGED b/fhem/CHANGED
index 6c87b2e94..332924963 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - bugfix: 88_HMCCUCHN: fixed bug in toggle command
+ - bugfix: 88_HMCCUDEV: fixed bug in toggle command
- bugfix: 98_DLNARenderer: fixed SyncPlay for CaskeId players
- change: 10_ZWAVE: TRANSMIT_NO_ACK is reading only (Forum #57781)
- feature: 93_DbRep: new attr readingPreventFromDel to prevent readings from
diff --git a/fhem/FHEM/88_HMCCUCHN.pm b/fhem/FHEM/88_HMCCUCHN.pm
index 5086d722b..8c22fe300 100644
--- a/fhem/FHEM/88_HMCCUCHN.pm
+++ b/fhem/FHEM/88_HMCCUCHN.pm
@@ -268,7 +268,7 @@ sub HMCCUCHN_Set ($@)
my $tstates = $hash->{statevals};
$tstates =~ s/devstate\|//;
my @states = split /\|/, $tstates;
- my $sc = scalar (@states);
+ my $stc = scalar (@states);
my $objname = $ccuif.'.'.$ccuaddr.'.'.$sd;
($rc, $result) = HMCCU_GetDatapoint ($hash, $objname);
@@ -276,9 +276,9 @@ sub HMCCUCHN_Set ($@)
my $objvalue = '';
my $st = 0;
- while ($st < $sc) {
+ while ($st < $stc) {
if ($states[$st] eq $result) {
- $objvalue = ($st == $sc-1) ? $states[0] : $states[$st+1];
+ $objvalue = ($st == $stc-1) ? $states[0] : $states[$st+1];
last;
}
else {
@@ -589,7 +589,7 @@ sub HMCCUCHN_SetError ($$)
[...]
Set config parameters of CCU channel. This is equal to setting device parameters in CCU.
Valid parameters can be listed by using command 'get configdesc'.
-
+