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

don't trigger RGB if unchanged

git-svn-id: https://svn.fhem.de/fhem/trunk@5134 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2014-03-05 10:56:47 +00:00
parent 804b8a0263
commit c7dbc74cc1

View File

@ -185,6 +185,7 @@ sub HUEDevice_Define($$)
$hash->{helper}{percent} = -1;
$hash->{helper}{RGB} = '';
$attr{$name}{devStateIcon} = '{(HUEDevice_devStateIcon($name),"toggle")}' if( !defined( $attr{$name}{devStateIcon} ) );
} else {
@ -716,8 +717,9 @@ HUEDevice_GetUpdate($)
if( $s ne $hash->{STATE} ) {readingsBulkUpdate($hash,"state",$s);}
readingsEndUpdate($hash,defined($hash->{LOCAL} ? 0 : 1));
CommandTrigger( "", "$name RGB: ".CommandGet("","$name rgb") );
my $RGB = CommandGet("","$name rgb");
CommandTrigger( "", "$name RGB: $RGB" ) if( $RGB != $hash->{helper}{RGB} );
$hash->{helper}{RGB} = $RGB;
}
1;