From ee00adda699dbd6fcb013c9aec00dd7193b70674 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Sun, 1 Oct 2017 10:17:28 +0000 Subject: [PATCH] 98_cmdalias: implement the disable attribute (Forum #77323) git-svn-id: https://svn.fhem.de/fhem/trunk@15161 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_cmdalias.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_cmdalias.pm b/fhem/FHEM/98_cmdalias.pm index 8184c72ef..aa8884f72 100644 --- a/fhem/FHEM/98_cmdalias.pm +++ b/fhem/FHEM/98_cmdalias.pm @@ -15,7 +15,7 @@ cmdalias_Initialize($) my ($hash) = @_; $hash->{DefFn} = "cmdalias_Define"; $hash->{UndefFn} = "cmdalias_Undefine"; - $hash->{AttrList} = "disable:0,1"; + $hash->{AttrList} = "disable:0,1 disabledForIntervals"; } @@ -85,7 +85,7 @@ CommandCmdAlias($$$) Log3 $n, 3, "cmdalias $n called recursively, skipping execution"; next; } - if($doesMatch) { + if($doesMatch && !IsDisabled($h->{NAME})) { my %specials= ("%EVENT" => $param); my $exec = EvalSpecials($h->{NEWCMD}, %specials); $h->{InExec} = 1; @@ -141,6 +141,12 @@ CommandCmdAlias($$$) define s2 cmdalias set lamp .* AS { Log 1, "$EVENT";; fhem("set $EVENT") } + + Attribute + =end html