98_GEOFANCY: add disabled attribute
git-svn-id: https://svn.fhem.de/fhem/trunk@13317 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -69,7 +69,7 @@ sub GEOFANCY_Initialize($) {
|
|||||||
$hash->{SetFn} = "GEOFANCY_Set";
|
$hash->{SetFn} = "GEOFANCY_Set";
|
||||||
$hash->{DefFn} = "GEOFANCY_Define";
|
$hash->{DefFn} = "GEOFANCY_Define";
|
||||||
$hash->{UndefFn} = "GEOFANCY_Undefine";
|
$hash->{UndefFn} = "GEOFANCY_Undefine";
|
||||||
$hash->{AttrList} = "devAlias " . $readingFnAttributes;
|
$hash->{AttrList} = "devAlias disabled:0,1 " . $readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
@@ -194,6 +194,10 @@ sub GEOFANCY_CGI() {
|
|||||||
"NOK No GEOFANCY device for webhook $link" )
|
"NOK No GEOFANCY device for webhook $link" )
|
||||||
unless ($name);
|
unless ($name);
|
||||||
|
|
||||||
|
# return error if no such device
|
||||||
|
return ( "text/plain; charset=utf-8", "NOK disabled" )
|
||||||
|
if ( IsDisabled($name) );
|
||||||
|
|
||||||
# extract values from URI
|
# extract values from URI
|
||||||
my $webArgs;
|
my $webArgs;
|
||||||
foreach my $pv ( split( "&", $URI ) ) {
|
foreach my $pv ( split( "&", $URI ) ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user