mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +00:00
98_weekprofile: add reading topics - a list of topic names
git-svn-id: https://svn.fhem.de/fhem/trunk@20427 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c8cc9db927
commit
447dde7012
@ -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: 98_weekprofile: add reading topics - a list of topic names
|
||||||
- change: 57_Calendar: new attribute, cutoffLaterThan; events without
|
- change: 57_Calendar: new attribute, cutoffLaterThan; events without
|
||||||
DURATION and DTEND last 1 day; several fixes (see
|
DURATION and DTEND last 1 day; several fixes (see
|
||||||
https://forum.fhem.de/index.php/topic,104587.msg985270.html);
|
https://forum.fhem.de/index.php/topic,104587.msg985270.html);
|
||||||
|
@ -595,12 +595,23 @@ sub weekprofile_updateReadings($)
|
|||||||
#$idx++;
|
#$idx++;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
my $topic_list="";
|
||||||
splice(@{$hash->{TOPICS}});
|
splice(@{$hash->{TOPICS}});
|
||||||
foreach my $prf (@{$hash->{PROFILES}}) {
|
foreach my $prf (@{$hash->{PROFILES}}) {
|
||||||
if ( !grep( /^$prf->{TOPIC}$/, @{$hash->{TOPICS}}) ) {
|
if ( !grep( /^$prf->{TOPIC}$/, @{$hash->{TOPICS}}) ) {
|
||||||
push @{$hash->{TOPICS}}, $prf->{TOPIC};
|
push @{$hash->{TOPICS}}, $prf->{TOPIC};
|
||||||
|
if (length($topic_list) > 0){
|
||||||
|
$topic_list = $topic_list . ':' . $prf->{TOPIC};
|
||||||
|
} else {
|
||||||
|
$topic_list = $prf->{TOPIC};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $useTopics = AttrVal($hash->{NAME},"useTopics",0);
|
||||||
|
if ($useTopics) {
|
||||||
|
readingsBulkUpdate($hash,"topics",$topic_list);
|
||||||
|
}
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
}
|
}
|
||||||
##############################################
|
##############################################
|
||||||
@ -1558,6 +1569,9 @@ sub weekprofile_getEditLNK_MasterDev($$)
|
|||||||
<li>profile_count<br>
|
<li>profile_count<br>
|
||||||
Count of all profiles including references.
|
Count of all profiles including references.
|
||||||
</li>
|
</li>
|
||||||
|
<li>topics<br>
|
||||||
|
List of topic names with ':' as delimiter
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="weekprofileattr"></a>
|
<a name="weekprofileattr"></a>
|
||||||
@ -1727,6 +1741,9 @@ sub weekprofile_getEditLNK_MasterDev($$)
|
|||||||
<li>profile_count<br>
|
<li>profile_count<br>
|
||||||
Anzahl aller Profile mit Referenzen.
|
Anzahl aller Profile mit Referenzen.
|
||||||
</li>
|
</li>
|
||||||
|
<li>topics<br>
|
||||||
|
Liste von Topicnamen getrennt durch ':'
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="weekprofileattr"></a>
|
<a name="weekprofileattr"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user