From 2a9abd69b5edcba58e6ad962eeb4a00e9963635a Mon Sep 17 00:00:00 2001
From: borisneubert <>
Date: Tue, 8 Nov 2016 16:09:12 +0000
Subject: [PATCH] 67_ECMDDevice: new attribute noState
git-svn-id: https://svn.fhem.de/fhem/trunk@12530 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/CHANGED | 1 +
fhem/FHEM/67_ECMDDevice.pm | 15 +++++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/fhem/CHANGED b/fhem/CHANGED
index fb60c9e3e..02700159b 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - feature: 67_ECMDDevice: new attribute noState
- bugfix: 02_RSS: make hash reference explicit
- updated: 74_AMAD: New Version 2.6.6 remove APSSID in define, add Attribut
setAPSSID to prevent WLan sleeps, add Attribut
diff --git a/fhem/FHEM/67_ECMDDevice.pm b/fhem/FHEM/67_ECMDDevice.pm
index 179a5323f..c95a2bb8f 100644
--- a/fhem/FHEM/67_ECMDDevice.pm
+++ b/fhem/FHEM/67_ECMDDevice.pm
@@ -48,7 +48,7 @@ ECMDDevice_Initialize($)
$hash->{ParseFn} = "ECMDDevice_Parse";
$hash->{AttrFn} = "ECMDDevice_Attr";
- $hash->{AttrList} = "IODev class ".
+ $hash->{AttrList} = "IODev class noState ".
$readingFnAttributes;
}
@@ -141,7 +141,9 @@ ECMDDevice_Changed($$$)
$state.= " $value" if(defined($value) && $value ne "");
#Debug "cmd= $cmd, setting state to $state (DEFAULT)";
}
- readingsBulkUpdate($hash, "state", $state) if(defined($state));
+ if(!AttrVal($hash->{NAME}, "noState", 0)) {
+ readingsBulkUpdate($hash, "state", $state) if(defined($state));
+ }
readingsEndUpdate($hash, 1);
my $name= $hash->{NAME};
@@ -519,6 +521,9 @@ ECMDDevice_Define($$)
#############################
=pod
+=item device
+=item summary user-defined device communicating through ECMD
+=item summary_DE ein benutzerdefiniertes Gerät, welches über ECMD kommuniziert
=begin html
@@ -598,6 +603,12 @@ ECMDDevice_Define($$)
If you omit the <classname> and <parameter> references in the
definition of the device, you have to add them
separately as an attribute. Example: attr myRelais2 class relais 8
.
+