# $Id$ package main; use strict; use warnings; sub FHEM_colorpickerFn($$$) { my ($FW_wname, $d, $FW_room, $cmd, $values) = @_; my @args = split("[ \t]+", $cmd); return undef if($values !~ m/^colorpicker,(.*)$/); my ($mode) = ($1); $mode = "RGB" if( !defined($mode) ); my $srf = $FW_room ? "&room=$FW_room" : ""; my $cv = CommandGet("","$d $cmd"); $cmd = "" if($cmd eq "state"); if( $args[1] ) { my $c = "cmd=set $d $cmd$srf"; return '