2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

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:
jpawlowski 2017-02-03 08:02:06 +00:00
parent aa8fe0fbb6
commit 3a20d1d14a

View File

@ -69,7 +69,7 @@ sub GEOFANCY_Initialize($) {
$hash->{SetFn} = "GEOFANCY_Set";
$hash->{DefFn} = "GEOFANCY_Define";
$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" )
unless ($name);
# return error if no such device
return ( "text/plain; charset=utf-8", "NOK disabled" )
if ( IsDisabled($name) );
# extract values from URI
my $webArgs;
foreach my $pv ( split( "&", $URI ) ) {