diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index 89a65021c..c56978ba1 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -66,8 +66,7 @@ sub HUEDevice_Initialize($) #$hash->{FW_summaryFn} = "HUEDevice_summaryFn"; - $data{webCmdFn}{colorpicker} = "FHEM_colorpickerFn"; - $data{FWEXT}{"/"}{SCRIPT} = "/jscolor/jscolor.js"; + FHEM_colorpickerInit(); } sub @@ -531,7 +530,7 @@ HUEDevice_GetUpdate($) if( !defined( $attr{$name}{webCmd} ) ) { $attr{$name}{webCmd} = 'rgb:rgb ff0000:rgb 98FF23:rgb 0000ff:toggle:on:off' if( $attr{$name}{subType} eq "colordimmer" ); - $attr{$name}{webCmd} = 'rgb:rgb ff0000:rgb C8FF12:rgb 0000ff:toggle:on:off' if( AttrVal($name, "model", "") eq "LCT001" ); + $attr{$name}{webCmd} = 'rgb:rgb ff0000:rgb DEFF26:rgb 0000ff:toggle:on:off' if( AttrVal($name, "model", "") eq "LCT001" ); $attr{$name}{webCmd} = 'pct:toggle:on:off' if( $attr{$name}{subType} eq "dimmer" ); $attr{$name}{webCmd} = 'toggle:on:off' if( $attr{$name}{subType} eq "switch" ); } diff --git a/fhem/FHEM/35_SWAP_0000002200000003.pm b/fhem/FHEM/35_SWAP_0000002200000003.pm index b24232754..892f90f45 100755 --- a/fhem/FHEM/35_SWAP_0000002200000003.pm +++ b/fhem/FHEM/35_SWAP_0000002200000003.pm @@ -73,8 +73,7 @@ SWAP_0000002200000003_Initialize($) #$hash->{FW_summaryFn} = "SWAP_0000002200000003_summaryFn"; - $data{webCmdFn}{colorpicker} = "FHEM_colorpickerFn"; - $data{FWEXT}{"/"}{SCRIPT} = "/jscolor/jscolor.js"; + FHEM_colorpickerInit(); return $ret; } diff --git a/fhem/FHEM/Color.pm b/fhem/FHEM/Color.pm index ada81a4c5..e8c1b07ad 100644 --- a/fhem/FHEM/Color.pm +++ b/fhem/FHEM/Color.pm @@ -6,6 +6,13 @@ package main; use strict; use warnings; +sub +FHEM_colorpickerInit() +{ + $data{webCmdFn}{colorpicker} = "FHEM_colorpickerFn"; + $data{FWEXT}{colorpicker}{SCRIPT} = "/jscolor/jscolor.js"; +} + sub FHEM_colorpickerFn($$$) {