2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

98_DOIFtools: move paw from DEF to .associatedWith

git-svn-id: https://svn.fhem.de/fhem/trunk@27852 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2023-08-17 17:13:50 +00:00
parent 6a6e483b94
commit 16b0beb506
2 changed files with 14 additions and 4 deletions

View File

@ -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.
- change: 98_DOIFtools: move paw from DEF to .associatedWith.
- bugfix: 72_FRITZBOX: Fehler bei ApiCheck für alte FritzOS behoben. - bugfix: 72_FRITZBOX: Fehler bei ApiCheck für alte FritzOS behoben.
feature: FB Name, Model, FritzOS Ermittlung überarbeitet feature: FB Name, Model, FritzOS Ermittlung überarbeitet
- feature: 50_Signalbot: Trust handling, Chat history - feature: 50_Signalbot: Trust handling, Chat history

View File

@ -612,9 +612,9 @@ sub DOIFtools_Notify($$) {
} }
# DOIFtools DEF addition # DOIFtools DEF addition
if ($sn eq "global" and $event =~ "^INITIALIZED\$|^MODIFIED|^DEFINED|^DELETED|^RENAMED|^UNDEFINED") { if ($sn eq "global" and $event =~ "^INITIALIZED\$|^MODIFIED|^DEFINED|^DELETED|^RENAMED|^UNDEFINED") {
my @doifList = devspec2array("TYPE=DOIF"); my $paw = join( ' ', devspec2array( "TYPE=DOIF" ) );
$hash->{DEF} = "associated DOIF: ".join(" ",sort @doifList); readingsSingleUpdate( $hash, '.associatedWith', $paw, 0 );
readingsSingleUpdate($hash,"DOIF_version",fhem("version 98_DOIF.pm noheader",1),0); readingsSingleUpdate( $hash, "DOIF_version",fhem("version 98_DOIF.pm noheader",1), 0 );
} }
# get DOIF version, FHEM revision and default values # get DOIF version, FHEM revision and default values
if ($sn eq "global" and $event =~ "^INITIALIZED\$|^MODIFIED $pn") { if ($sn eq "global" and $event =~ "^INITIALIZED\$|^MODIFIED $pn") {
@ -627,7 +627,6 @@ sub DOIFtools_Notify($$) {
readingsBulkUpdate($hash,".eM", ReadingsVal($pn,".eM","off")); readingsBulkUpdate($hash,".eM", ReadingsVal($pn,".eM","off"));
readingsBulkUpdate($hash,"statisticsDeviceFilterRegex", ".*") unless ReadingsVal($pn,"statisticsDeviceFilterRegex",""); readingsBulkUpdate($hash,"statisticsDeviceFilterRegex", ".*") unless ReadingsVal($pn,"statisticsDeviceFilterRegex","");
readingsEndUpdate($hash,0); readingsEndUpdate($hash,0);
$defs{$pn}{VERSION} = fhem("version 98_DOIFtools.pm noheader",1);
DOIFtoolsSetNotifyDev($hash,1,1); DOIFtoolsSetNotifyDev($hash,1,1);
#set new attributes and delete old ones #set new attributes and delete old ones
CommandAttr(undef,"$pn DOIFtoolsExecuteDefinition ".AttrVal($pn,"executeDefinition","")) if (AttrVal($pn,"executeDefinition","")); CommandAttr(undef,"$pn DOIFtoolsExecuteDefinition ".AttrVal($pn,"executeDefinition","")) if (AttrVal($pn,"executeDefinition",""));
@ -1091,6 +1090,16 @@ sub DOIFtools_Define($$$)
$hash->{logfile} = AttrVal($pn,"DOIFtoolsLogDir",AttrVal("global","logdir","./log/"))."$hash->{TYPE}Log-%Y-%j.log"; $hash->{logfile} = AttrVal($pn,"DOIFtoolsLogDir",AttrVal("global","logdir","./log/"))."$hash->{TYPE}Log-%Y-%j.log";
DOIFtoolsCounterReset($pn); DOIFtoolsCounterReset($pn);
readingsSingleUpdate($hash,"state","initialized",0); readingsSingleUpdate($hash,"state","initialized",0);
my $cvsid = '$Id$';
( $hash->{VERSION} ) = $cvsid =~ /\.pm (.*)Z/;
if ( $init_done ) {
my $paw = join( ' ', devspec2array( "TYPE=DOIF" ) );
readingsSingleUpdate( $hash, '.associatedWith', $paw, 0 );
}
return undef; return undef;
} }