mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
proper colorpicker registration in Color.pm
git-svn-id: https://svn.fhem.de/fhem/trunk@3902 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7aa882f9fb
commit
6fa38ab5f7
@ -66,8 +66,7 @@ sub HUEDevice_Initialize($)
|
|||||||
|
|
||||||
#$hash->{FW_summaryFn} = "HUEDevice_summaryFn";
|
#$hash->{FW_summaryFn} = "HUEDevice_summaryFn";
|
||||||
|
|
||||||
$data{webCmdFn}{colorpicker} = "FHEM_colorpickerFn";
|
FHEM_colorpickerInit();
|
||||||
$data{FWEXT}{"/"}{SCRIPT} = "/jscolor/jscolor.js";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
@ -531,7 +530,7 @@ HUEDevice_GetUpdate($)
|
|||||||
|
|
||||||
if( !defined( $attr{$name}{webCmd} ) ) {
|
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 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} = 'pct:toggle:on:off' if( $attr{$name}{subType} eq "dimmer" );
|
||||||
$attr{$name}{webCmd} = 'toggle:on:off' if( $attr{$name}{subType} eq "switch" );
|
$attr{$name}{webCmd} = 'toggle:on:off' if( $attr{$name}{subType} eq "switch" );
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,7 @@ SWAP_0000002200000003_Initialize($)
|
|||||||
|
|
||||||
#$hash->{FW_summaryFn} = "SWAP_0000002200000003_summaryFn";
|
#$hash->{FW_summaryFn} = "SWAP_0000002200000003_summaryFn";
|
||||||
|
|
||||||
$data{webCmdFn}{colorpicker} = "FHEM_colorpickerFn";
|
FHEM_colorpickerInit();
|
||||||
$data{FWEXT}{"/"}{SCRIPT} = "/jscolor/jscolor.js";
|
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,13 @@ package main;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
sub
|
||||||
|
FHEM_colorpickerInit()
|
||||||
|
{
|
||||||
|
$data{webCmdFn}{colorpicker} = "FHEM_colorpickerFn";
|
||||||
|
$data{FWEXT}{colorpicker}{SCRIPT} = "/jscolor/jscolor.js";
|
||||||
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
FHEM_colorpickerFn($$$)
|
FHEM_colorpickerFn($$$)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user