From 165ee7b65cecee851e435a7ef430e50702b51d4d Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 17 Nov 2016 16:27:57 +0000 Subject: [PATCH] 98_dummy.pm: add disable/disabledForIntervals git-svn-id: https://svn.fhem.de/fhem/trunk@12596 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_dummy.pm | 10 ++++++++++ fhem/fhem.pl | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/98_dummy.pm b/fhem/FHEM/98_dummy.pm index c2651175b..5494f16ee 100644 --- a/fhem/FHEM/98_dummy.pm +++ b/fhem/FHEM/98_dummy.pm @@ -14,6 +14,7 @@ dummy_Initialize($) $hash->{SetFn} = "dummy_Set"; $hash->{DefFn} = "dummy_Define"; $hash->{AttrList} = "readingList setList useSetExtensions " . + "disable disabledForIntervals ". $readingFnAttributes; } @@ -37,6 +38,11 @@ dummy_Set($@) return "Unknown argument ?, choose one of $setList" if($a[0] eq "?"); } + return undef + if($attr{$name} && # Avoid checking it if only STATE is inactive + ($attr{$name}{disable} || $attr{$name}{disabledForIntervals}) && + IsDisabled($name)); + my @rl = split(" ", AttrVal($name, "readingList", "")); my $doRet; eval { @@ -110,6 +116,8 @@ dummy_Define($$) Attributes