mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +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:
parent
aa8fe0fbb6
commit
3a20d1d14a
@ -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 ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user