mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
Added disable attribute to pushover module.
git-svn-id: https://svn.fhem.de/fhem/trunk@6076 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
60502ad47b
commit
f32d2aec94
@ -54,7 +54,7 @@ sub Pushover_Initialize($$)
|
|||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
$hash->{DefFn} = "Pushover_Define";
|
$hash->{DefFn} = "Pushover_Define";
|
||||||
$hash->{SetFn} = "Pushover_Set";
|
$hash->{SetFn} = "Pushover_Set";
|
||||||
$hash->{AttrList} = "timestamp:0,1 title sound device priority:0,1,-1";
|
$hash->{AttrList} = "disable:0,1 timestamp:0,1 title sound device priority:0,1,-1";
|
||||||
#a priority value of 2 is not predifined as for this also a value for retry and expire must be set
|
#a priority value of 2 is not predifined as for this also a value for retry and expire must be set
|
||||||
#which will most likely not be used with default values.
|
#which will most likely not be used with default values.
|
||||||
}
|
}
|
||||||
@ -99,6 +99,11 @@ sub Pushover_Set($@)
|
|||||||
return "Unknown argument " . $cmd . ", choose one of " . join(" ", sort keys %sets);
|
return "Unknown argument " . $cmd . ", choose one of " . join(" ", sort keys %sets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (AttrVal($name, "disable", 0 ) == 1)
|
||||||
|
{
|
||||||
|
return "Device is disabled";
|
||||||
|
}
|
||||||
|
|
||||||
if ($cmd eq 'msg')
|
if ($cmd eq 'msg')
|
||||||
{
|
{
|
||||||
return Pushover_Set_Message($hash, @args);
|
return Pushover_Set_Message($hash, @args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user