mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 06:36:04 +00:00
67_ECMDDevice: new attribute noState
git-svn-id: https://svn.fhem.de/fhem/trunk@12530 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
31e327fa7b
commit
2a9abd69b5
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 67_ECMDDevice: new attribute noState
|
||||||
- bugfix: 02_RSS: make hash reference explicit
|
- bugfix: 02_RSS: make hash reference explicit
|
||||||
- updated: 74_AMAD: New Version 2.6.6 remove APSSID in define, add Attribut
|
- updated: 74_AMAD: New Version 2.6.6 remove APSSID in define, add Attribut
|
||||||
setAPSSID to prevent WLan sleeps, add Attribut
|
setAPSSID to prevent WLan sleeps, add Attribut
|
||||||
|
@ -48,7 +48,7 @@ ECMDDevice_Initialize($)
|
|||||||
$hash->{ParseFn} = "ECMDDevice_Parse";
|
$hash->{ParseFn} = "ECMDDevice_Parse";
|
||||||
|
|
||||||
$hash->{AttrFn} = "ECMDDevice_Attr";
|
$hash->{AttrFn} = "ECMDDevice_Attr";
|
||||||
$hash->{AttrList} = "IODev class ".
|
$hash->{AttrList} = "IODev class noState ".
|
||||||
$readingFnAttributes;
|
$readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +141,9 @@ ECMDDevice_Changed($$$)
|
|||||||
$state.= " $value" if(defined($value) && $value ne "");
|
$state.= " $value" if(defined($value) && $value ne "");
|
||||||
#Debug "cmd= $cmd, setting state to $state (DEFAULT)";
|
#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);
|
readingsEndUpdate($hash, 1);
|
||||||
my $name= $hash->{NAME};
|
my $name= $hash->{NAME};
|
||||||
@ -519,6 +521,9 @@ ECMDDevice_Define($$)
|
|||||||
#############################
|
#############################
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
=item device
|
||||||
|
=item summary user-defined device communicating through ECMD
|
||||||
|
=item summary_DE ein benutzerdefiniertes Gerät, welches über ECMD kommuniziert
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="ECMDDevice"></a>
|
<a name="ECMDDevice"></a>
|
||||||
@ -598,6 +603,12 @@ ECMDDevice_Define($$)
|
|||||||
If you omit the <classname> and <parameter> references in the
|
If you omit the <classname> and <parameter> references in the
|
||||||
<a href="#ECMDDevicedefine">definition</a> of the device, you have to add them
|
<a href="#ECMDDevicedefine">definition</a> of the device, you have to add them
|
||||||
separately as an attribute. Example: <code>attr myRelais2 class relais 8</code>.</li>
|
separately as an attribute. Example: <code>attr myRelais2 class relais 8</code>.</li>
|
||||||
|
<li>noState<br>
|
||||||
|
Changes of readings do not change the state reading if this attribute is set to a non-zero value.
|
||||||
|
For example, this is desirable if you need to avoid the second event created by changing the state
|
||||||
|
reading. Previously created state readings can be deleted by means of <a href="#deletereading">deletereading</a>.
|
||||||
|
The user can define the value shown in the state of the device by means
|
||||||
|
of the <a href="#stateFormat">stateFormat</a> attribute.</li>
|
||||||
<li><a href="#verbose">verbose</a></li>
|
<li><a href="#verbose">verbose</a></li>
|
||||||
<li><a href="#eventMap">eventMap</a></li>
|
<li><a href="#eventMap">eventMap</a></li>
|
||||||
<li><a href="#IODev">IODev</a></li>
|
<li><a href="#IODev">IODev</a></li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user