diff --git a/fhem/FHEM/36_Shelly.pm b/fhem/FHEM/36_Shelly.pm index 5285dc993..2637ad97d 100644 --- a/fhem/FHEM/36_Shelly.pm +++ b/fhem/FHEM/36_Shelly.pm @@ -39,7 +39,7 @@ use vars qw{%attr %defs}; sub Log($$); #-- globals on start -my $version = "2.11"; +my $version = "2.12"; #-- these we may get on request my %gets = ( @@ -709,6 +709,10 @@ sub Shelly_Set ($@) { if( $cmd eq "hsv" ){ my($hue,$saturation,$value)=split(',',$value); + #-- rescale + if( $hue>1 ){ + $hue = $hue/360; + } my ($red,$green,$blue)=Color::hsv2rgb($hue,$saturation,$value); $cmd=sprintf("red=%d&green=%d&blue=%d",int($red*255+0.5),int($green*255+0.5),int($blue*255+0.5)); Shelly_dim($hash,"color/0","?".$cmd); @@ -1478,7 +1482,8 @@ sub Shelly_updown2($){
switches device on or off for <time> seconds.
  • set <name> hsv <hue value 0..360>,<saturation value 0..1>,<brightness value 0..1> -
    comma separated list of hue, saturation and value to set the color
  • +
    comma separated list of hue, saturation and value to set the color. Note, that 360° is the same hue as 0° = red. + Hue values smaller than 1 will be treated as fraction of the full circle, e.g. 0.5 will give the same hue as 180°.
  • set <name> rgb <rrggbb>
    6-digit hex string to set the color