mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
39_gassistant: disable testdevice creation
git-svn-id: https://svn.fhem.de/fhem/trunk@19711 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0e0b1e5660
commit
884c0b1020
@ -77,15 +77,6 @@ gassistant_Define($$)
|
|||||||
my $name = $a[0];
|
my $name = $a[0];
|
||||||
$hash->{NAME} = $name;
|
$hash->{NAME} = $name;
|
||||||
|
|
||||||
if( !defined( $attr{$hash->{NAME}}{room} ) ) {
|
|
||||||
$attr{$hash->{NAME}}{room} = "GoogleAssistant";
|
|
||||||
#create dummy on/off device
|
|
||||||
CommandDefine(undef, "GoogleAssistant_dummy dummy");
|
|
||||||
CommandAttr(undef, "GoogleAssistant_dummy alias Testlight");
|
|
||||||
CommandAttr(undef, "GoogleAssistant_dummy genericDeviceType light");
|
|
||||||
CommandAttr(undef, "GoogleAssistant_dummy setList on off");
|
|
||||||
CommandAttr(undef, "GoogleAssistant_dummy room GoogleAssistant");
|
|
||||||
}
|
|
||||||
|
|
||||||
my $d = $modules{$hash->{TYPE}}{defptr};
|
my $d = $modules{$hash->{TYPE}}{defptr};
|
||||||
return "$hash->{TYPE} device already defined as $d->{NAME}." if( defined($d) && $name ne $d->{NAME} );
|
return "$hash->{TYPE} device already defined as $d->{NAME}." if( defined($d) && $name ne $d->{NAME} );
|
||||||
@ -108,6 +99,16 @@ gassistant_Define($$)
|
|||||||
CommandAttr(undef, "$name devStateIcon stopped:control_home\@red:start stopping:control_on_off\@orange running.*:control_on_off\@green:stop")
|
CommandAttr(undef, "$name devStateIcon stopped:control_home\@red:start stopping:control_on_off\@orange running.*:control_on_off\@green:stop")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( 0 && !AttrVal($name, 'room', undef ) ) {
|
||||||
|
$attr{$hash->{NAME}}{room} = "GoogleAssistant";
|
||||||
|
#create dummy on/off device
|
||||||
|
CommandDefine(undef, "GoogleAssistant_dummy dummy");
|
||||||
|
CommandAttr(undef, "GoogleAssistant_dummy alias Testlight");
|
||||||
|
CommandAttr(undef, "GoogleAssistant_dummy genericDeviceType light");
|
||||||
|
CommandAttr(undef, "GoogleAssistant_dummy setList on off");
|
||||||
|
CommandAttr(undef, "GoogleAssistant_dummy room GoogleAssistant");
|
||||||
|
}
|
||||||
|
|
||||||
$hash->{CoProcess} = { name => 'gassistant-fhem',
|
$hash->{CoProcess} = { name => 'gassistant-fhem',
|
||||||
cmdFn => 'gassistant_getCMD',
|
cmdFn => 'gassistant_getCMD',
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user