2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

correct LED16 state after set

git-svn-id: https://svn.fhem.de/fhem/trunk@3816 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-08-28 18:27:41 +00:00
parent d048d8de7e
commit 7f06f10bea

View File

@ -1146,7 +1146,7 @@ sub CUL_HM_Parse($$) {##############################
for(my $cCnt = 0;$cCnt<16;$cCnt++){# go for all channels for(my $cCnt = 0;$cCnt<16;$cCnt++){# go for all channels
my $cH = $modules{CUL_HM}{defptr}{$src.sprintf("%02X",$cCnt+1)}; my $cH = $modules{CUL_HM}{defptr}{$src.sprintf("%02X",$cCnt+1)};
next if (!$cH); next if (!$cH);
if (ReadingsVal($cH->{NAME},"color","") ne $leds[$cCnt]) { if (ReadingsVal($cH->{NAME},"state","") ne $leds[$cCnt]) {
push @entities,CUL_HM_UpdtReadBulk($cH,1,"color:".$leds[$cCnt], push @entities,CUL_HM_UpdtReadBulk($cH,1,"color:".$leds[$cCnt],
"state:".$leds[$cCnt]); "state:".$leds[$cCnt]);
} }
@ -2549,9 +2549,10 @@ sub CUL_HM_Set($@) {
CUL_HM_UpdtReadBulk($hash,1,"color:".$col4all, CUL_HM_UpdtReadBulk($hash,1,"color:".$col4all,
"state:set_".$col4all); "state:set_".$col4all);
CUL_HM_PushCmdStack($hash,"++".$flag."11".$id.$dst."8100".$col4all); CUL_HM_PushCmdStack($hash,"++".$flag."11".$id.$dst."8100".$col4all);
}else{# operating on a channel }
else{# operating on a channel
return "$a[2] unknown. use: ".join(" ",sort keys(%color)) return "$a[2] unknown. use: ".join(" ",sort keys(%color))
if (!defined($color{$a[2]}) ); if (!defined($color{$a[2]}) );
CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'80'.$chn.'0'.$color{$a[2]}); CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'80'.$chn.'0'.$color{$a[2]});
} }
} }