2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

30_tradfri.pm: added createEventTimestampReading attribute

git-svn-id: https://svn.fhem.de/fhem/trunk@25768 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2022-03-03 20:40:32 +00:00
parent ed0b2a1c90
commit 16dde85aee

View File

@ -51,6 +51,7 @@ tradfri_Initialize($)
"tradfriFHEM-securityCode ".
"tradfriFHEM-sshHost tradfriFHEM-sshUser ".
"disable:1 disabledForIntervals ".
"createEventTimestampReading:1,0 ".
"createGroupReadings:1,0 ".
$readingFnAttributes;
@ -191,6 +192,10 @@ tradfri_processEvent($$) {
my ($hash,$decoded) = @_;
my $name = $hash->{NAME};
if( defined(my $create = AttrVal($name,'createEventTimestampReading',undef )) ) {
readingsSingleUpdate($hash, 'event', 'timestamp', $create ) if( $create );
}
my $id = $decoded->{id} ;
if( $decoded->{r} eq 'scene' ) {
@ -720,6 +725,16 @@ tradfri_Attr($$$)
The command to use as tradfri-fhem</li>
<li>tradfriFHEM-params<br>
Additional tradfri-fhem cmdline params.</li>
<a id="tradfri-attr-createEventTimestampReading"></a><li>createEventTimestampReading<br>
timestamp reading for every event received<br>
0 -> update reading without fhem event<br>
1 -> update reading with fhem event<br>
undef -> don't create reading</li>
<a id="tradfri-attr-createGroupReadings"></a><li>createGroupReadings<br>
create 'artificial' readings for group devices.<br>
0 -> create readings only for group devices where createGroupReadings ist set to 1<br>
1 -> create readings for all group devices where createGroupReadings ist not set or set to 1<br>
undef -> do nothing</li>
</ul>
</ul><br>