From a0be1a9ad9efb5a83504268539de94b859298a30 Mon Sep 17 00:00:00 2001 From: Risiko <> Date: Mon, 20 Sep 2021 09:42:04 +0000 Subject: [PATCH] 98_weekprofile: add userattr 'weekprofile' to supported modules git-svn-id: https://svn.fhem.de/fhem/trunk@24997 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/98_weekprofile.pm | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/fhem/CHANGED b/fhem/CHANGED index ab1919b4a..4ee31c436 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: 98_weekprofile: add userattr 'weekprofile' to supported modules - change: 98_weekprofile: using id's in module documentation - change: 93_RFHEM: Deprecation message (use FHEM2FHEM), some fixes - change: 93_DbRep: SQL code for SQLite, Forum:#122791 diff --git a/fhem/FHEM/98_weekprofile.pm b/fhem/FHEM/98_weekprofile.pm index d26cebe50..19e58af61 100644 --- a/fhem/FHEM/98_weekprofile.pm +++ b/fhem/FHEM/98_weekprofile.pm @@ -564,6 +564,9 @@ sub weekprofile_refreshSendDevList($) splice(@{$hash->{SNDDEVLIST}}); + my $useTopics = AttrVal($me,"useTopics",0); + Log3($me, 5, "$me(weekprofile_refreshSendDevList): start"); + foreach my $d (keys %defs) { next if ($defs{$d}{NAME} eq $me); @@ -581,7 +584,12 @@ sub weekprofile_refreshSendDevList($) $dev->{NAME} = $defs{$d}{NAME}; $dev->{ALIAS} = AttrVal($dev->{NAME},"alias",$dev->{NAME}); + # add userattr weekprofile to device + # help of attr weekprofile will come from module weekprofile + addToDevAttrList($dev->{NAME},"weekprofile","weekprofile") if ($useTopics); + push @{$hash->{SNDDEVLIST}} , $dev; + Log3($me, 5, "$me(weekprofile_refreshSendDevList): add device $dev->{NAME}"); } my $cnt = scalar(@{$hash->{SNDDEVLIST}}); Log3($me, 5, "$me(weekprofile_refreshSendDevList): $cnt devices in list"); @@ -1991,6 +1999,12 @@ __END__ Force to send the complete profile to the device instead of only the changes. Possibility to resend a complete week profile + +