From d0ab11a9fe165faf8e03f00d76aa2c4821c36346 Mon Sep 17 00:00:00 2001 From: justme1968 Date: Thu, 2 Apr 2015 18:21:19 +0000 Subject: [PATCH] 31_HUEDevice.pm: added transitiontime attribute git-svn-id: https://svn.fhem.de/fhem/trunk@8354 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/31_HUEDevice.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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.