mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-24 15:19:21 +00:00
fixed dimmer initialization
git-svn-id: https://svn.fhem.de/fhem/trunk@3117 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7eecd3f013
commit
5fa9696237
@ -119,8 +119,7 @@ sub HUEDevice_Define($$)
|
||||
$hash->{fhem}{xy} = '';
|
||||
|
||||
|
||||
CommandAttr(undef,$name.' webCmd rgb:rgb ff0000:rgb C8FF12:rgb 0000ff:toggle:on:off') if( !defined( AttrVal($hash->{NAME}, "webCmd", undef) ) );
|
||||
CommandAttr(undef,$name.' devStateIcon {CommandGet("","'.$name.' devStateIcon")}') if( !defined( AttrVal($hash->{NAME}, "devStateIcon", undef) ) );
|
||||
$attr{$name}{devStateIcon} = '{CommandGet("","'.$name.' devStateIcon")}' if( !defined( $attr{$name}{devStateIcon} ) );
|
||||
|
||||
AssignIoPort($hash);
|
||||
if(defined($hash->{IODev}->{NAME})) {
|
||||
@ -462,6 +461,13 @@ HUEDevice_GetUpdate($)
|
||||
|| !defined($attr{$name}{model})
|
||||
|| !defined($hueModels{$attr{$name}{model}}{subType}) );
|
||||
|
||||
$attr{$name}{devStateIcon} = '{CommandGet("","'.$name.' devStateIcon")}';
|
||||
if( !defined( $attr{$name}{webCmd} ) ) {
|
||||
$attr{$name}{webCmd} = 'rgb:rgb ff0000:rgb C8FF12:rgb 0000ff:toggle:on:off' if( $attr{$name}{subType} eq "colordimmer" );
|
||||
$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" );
|
||||
}
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
|
||||
my $state = $result->{'state'};
|
||||
|
Loading…
x
Reference in New Issue
Block a user