diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index 8b8d746a4..c00205723 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -87,6 +87,7 @@ sub HUEDevice_Initialize($) "delayedUpdate:1 ". "realtimePicker:1 ". "color-icons:1,2 ". + "transitiontime ". "model:".join(",", sort map { $_ =~ s/ /#/g ;$_} keys %hueModels)." ". "subType:extcolordimmer,colordimmer,ctdimmer,dimmer,switch ". $readingFnAttributes; @@ -123,8 +124,8 @@ HUEDevice_devStateIcon($) #return ".*:$s:toggle" if( AttrVal($name, "model", "") eq "LWB004" ); - return ".*:$s@#".CommandGet("","$name RGB").":toggle" if( $percent < 100 && AttrVal($name, "color-icons", 0) == 2 ); - return ".*:on@#".CommandGet("","$name rgb").":toggle" if( AttrVal($name, "color-icons", 0) != 0 ); + return ".*:$s@#".CommandGet("","$name RGB").":ct:hue:pct" if( $percent < 100 && AttrVal($name, "color-icons", 0) == 2 ); + return ".*:on@#".CommandGet("","$name rgb").":ct:hue:pct" if( AttrVal($name, "color-icons", 0) != 0 ); return '
'; @@ -490,6 +491,12 @@ HUEDevice_Set($@) HUEDevice_SetParam($name, \%obj, $cmd, $value, $value2); } + if( !defined($obj{transitiontime} ) ) { + my $transitiontime = AttrVal($name, "transitiontime", undef); + + $obj{transitiontime} = 0 + $transitiontime if( defined( $transitiontime ) ); + } + # if( $hash->{helper}->{update_timeout} == -1 ) { # my $diff; # my ($seconds, $microseconds) = gettimeofday(); @@ -1115,6 +1122,8 @@ HUEDevice_Parse($$) ctdimmer -> device has color temperature control
dimmer -> device has brightnes controll
switch -> device has on/off controll
+
  • transitiontime
    + default transitiontime for all set commands if not specified directly in the set.
  • delayedUpdate
    1 -> the update of the device status after a set command will be delayed for 1 second. usefull if multiple devices will be switched.