From 40c8a716cafe3a715fcaa2d2764d27c64b45f5e8 Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Sun, 16 Mar 2014 01:12:28 +0000 Subject: [PATCH] PHTV: fix commandref and possible scope for set-hue git-svn-id: https://svn.fhem.de/fhem/trunk@5229 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_PHTV.pm | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/fhem/FHEM/70_PHTV.pm b/fhem/FHEM/70_PHTV.pm index 5356a51c8..cf95dca7a 100644 --- a/fhem/FHEM/70_PHTV.pm +++ b/fhem/FHEM/70_PHTV.pm @@ -727,7 +727,7 @@ sub PHTV_Set($@) { my $_ = $a[2]; my $hsb; my $hex; - if ( m/^\d+$/ && $_ >= 0 && $_ <= 65534 ) { + if ( m/^\d+$/ && $_ >= 0 && $_ <= 65535 ) { $hsb = PHTV_hex2hsb( $hash->{READINGS}{rgb}{VAL} ); $hex = PHTV_hsb2hex( $_, $hsb->{s}, $hsb->{b} ); @@ -3048,12 +3048,15 @@ sub PHTV_min {

Examples:
- # set LED 0 on left side within layer 1 to color RED - set PhilipsTV rgb L1L0:FF0000

- # set LED 0, 2 and 4 on left side within layer 1 to color RED - set PhilipsTV rgb L1L0:FF0000 L1L2:FF0000 L1L4:FF0000

- # set complete right side within layer 1 to color GREEN - set PhilipsTV rgb L1R:00FF00

+ # set LED 0 on left side within layer 1 to color RED
+ set PhilipsTV rgb L1L0:FF0000 +

+ # set LED 0, 2 and 4 on left side within layer 1 to color RED
+ set PhilipsTV rgb L1L0:FF0000 L1L2:FF0000 L1L4:FF0000 +

+ # set complete right side within layer 1 to color GREEN
+ set PhilipsTV rgb L1R:00FF00 +

# set complete layer 1 to color BLUE set PhilipsTV rgb L1:0000FF

@@ -3082,17 +3085,22 @@ sub PHTV_min {

Examples:
- # to use only LED 4 from the top as source - attr PhilipsTV ambiHueTop HUEDevice0:4

- # to use a combination of LED's 1+2 as source - attr PhilipsTV ambiHueTop HUEDevice0:1-2

- # to use LED's 1+2 and only 90% of their saturation - attr PhilipsTV ambiHueTop HUEDevice0:1-2:90

- # to use LED's 1+2 and only 50% of their brightness - attr PhilipsTV ambiHueTop HUEDevice0:1-2::50

- # to use LED's 1+2, 90% saturation and 50% brightness + # to use only LED 4 from the top as source
+ attr PhilipsTV ambiHueTop HUEDevice0:4 +

+ # to use a combination of LED's 1+2 as source
+ attr PhilipsTV ambiHueTop HUEDevice0:1-2 +

+ # to use LED's 1+2 and only 90% of their saturation
+ attr PhilipsTV ambiHueTop HUEDevice0:1-2:90 +

+ # to use LED's 1+2 and only 50% of their brightness
+ attr PhilipsTV ambiHueTop HUEDevice0:1-2::50 +

+ # to use LED's 1+2, 90% saturation and 50% brightness
attr PhilipsTV ambiHueTop HUEDevice0:1-2:90:50 - # to use default LED settings but only adjust their brightness to 50% +

+ # to use default LED settings but only adjust their brightness to 50%
attr PhilipsTV ambiHueTop HUEDevice0:::50