From cac035ec830882ec3e667b007a2659bb33a11d7b Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Tue, 28 Jan 2020 21:10:55 +0000 Subject: [PATCH] 93_DbRep: contrib 8.31.0 git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21067 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/DS_Starter/93_DbRep.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/DS_Starter/93_DbRep.pm b/contrib/DS_Starter/93_DbRep.pm index 8d09a2132..8e5825e78 100644 --- a/contrib/DS_Starter/93_DbRep.pm +++ b/contrib/DS_Starter/93_DbRep.pm @@ -774,6 +774,9 @@ sub DbRep_Set($@) { if (!AttrVal($hash->{NAME}, "reading", "")) { return " The attribute reading to analyze is not set !"; } + if ($prop =~ /deleteOther/ && !AttrVal($hash->{NAME}, "allowDeletion", 0)) { + return " Set attribute 'allowDeletion' if you want to allow deletion of any database entries. Use it with care !"; + } if ($prop && $prop =~ /writeToDB/) { if (!AttrVal($hash->{NAME}, "device", "") || AttrVal($hash->{NAME}, "device", "") =~ /[%*:=,]/ || AttrVal($hash->{NAME}, "reading", "") =~ /[,\s]/) { return "If you want write results back to database, attributes \"device\" and \"reading\" must be set.