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

10_IT.pm: Fix wrong dim state for on/off switching

git-svn-id: https://svn.fhem.de/fhem/trunk@8311 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dancer0705 2015-03-28 15:40:22 +00:00
parent 293d3ec00a
commit 0b06153345

View File

@ -2,9 +2,11 @@
# InterTechno Switch Manager as FHM-Module
#
# (c) Olaf Droegehorn / DHS-Computertechnik GmbH
# (c) Björn Hempel
#
# Published under GNU GPL License
######################################################package main;
######################################################
package main;
# $Id$
@ -550,10 +552,14 @@ IT_Parse($$)
}
if ($def->{$name}->{$it_c2b{"on"}} eq lc($onoffcode)) {
$newstate="on";
readingsSingleUpdate($def->{$name},"dim",1,1);
if( AttrVal($name, "model", "") eq "itdimmer" ) {
readingsSingleUpdate($def->{$name},"dim",1,1);
}
} elsif ($def->{$name}->{$it_c2b{"off"}} eq lc($onoffcode)) {
$newstate="off";
readingsSingleUpdate($def->{$name},"dim",0,1);
if( AttrVal($name, "model", "") eq "itdimmer" ) {
readingsSingleUpdate($def->{$name},"dim",0,1);
}
} elsif ('d' eq lc($onoffcode)) {
# dim
my $binVal = ((bin2dec($dimCode)+1)*100)/16;