diff --git a/fhem/CHANGED b/fhem/CHANGED index fc1b91dd4..2725c82da 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # 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. + - bugfix: 98_weekprofile:create reference profile + from an other referenced profile - feature: 70_ESCVP21net: added 2-value commands - change: 88_HMCCU: Minor improvements - feature: 70_ESCVP21net: added LS12000 (with POPLP, LENS, HLENS) diff --git a/fhem/FHEM/98_weekprofile.pm b/fhem/FHEM/98_weekprofile.pm index 675d85084..dcf7cd261 100644 --- a/fhem/FHEM/98_weekprofile.pm +++ b/fhem/FHEM/98_weekprofile.pm @@ -1172,7 +1172,13 @@ sub weekprofile_Set($$@) my $prfDest = undef; foreach my $prf (@{$hash->{PROFILES}}){ $prfSrc = $prf if ( ($prf->{NAME} eq $srcName) && ($prf->{TOPIC} eq $srcTopic) ); + my ($prf2,undef) = weekprofile_findPRF($hash,$srcName,$srcTopic,0); + if ( $prf2 && defined $prf2->{REF} ) { + ($srcTopic, $srcName) = weekprofile_splitName($me, $prf2->{REF}); + $prfSrc = $prf2; + } $prfDest = $prf if ( ($prf->{NAME} eq $destName) && ($prf->{TOPIC} eq $destTopic) ); + last if defined $prfSrc && defined $prfDest; } return "Error unknown profile $srcName" unless($prfSrc); Log3($me, 4, "$me(Set): override profile $destName") if ($prfDest);