2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

10_IT: Fix wrong V3 dimm/off code

git-svn-id: https://svn.fhem.de/fhem/trunk@9444 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dancer0705 2015-10-12 18:56:31 +00:00
parent 392872159c
commit ef20289c7c
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# 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: 10_IT: Fix wrong V3 dimm/off code
- feature: 73_km200: Improving error message in state
- feature: SYSMON: FormatString for SYSMON_ShowValues.
- feature: 36_JeeLink: added timeout attribute (by HCS)

View File

@ -150,6 +150,7 @@ IT_Set($@)
if ($hash->{READINGS}{protocol}{VAL} eq "V3") {
if($na > 1 && $a[0] eq "dim") {
$a[0] = ($a[1] eq "0" ? "off" : sprintf("dim%02d%%",$a[1]) );
splice @a, 1, 1;
$na = int(@a);
} elsif ($na == 2 && ($a[0] =~ /dim/)) {
@ -253,7 +254,13 @@ IT_Set($@)
}
} else {
$message = "is".uc(substr($hash->{XMIT},0,length($hash->{XMIT})-5).$hash->{READINGS}{group}{VAL}.$hash->{$c}.$hash->{READINGS}{unit}{VAL});
my $stateVal;
if ($a[0] eq "off") {
$stateVal = "0";
} else {
$stateVal = $hash->{$c};
}
$message = "is".uc(substr($hash->{XMIT},0,length($hash->{XMIT})-5).$hash->{READINGS}{group}{VAL}.$stateVal.$hash->{READINGS}{unit}{VAL});
}
} else {
$message = "is".uc(substr($hash->{XMIT},0,length($hash->{XMIT})-5).$hash->{READINGS}{group}{VAL}.$hash->{$c}.$hash->{READINGS}{unit}{VAL});