From 043d4ee35db4431b210864ee0315b063a55a28c8 Mon Sep 17 00:00:00 2001 From: Risiko <> Date: Fri, 31 Jan 2020 18:39:41 +0000 Subject: [PATCH] 98_weekprofile: fix: html output for command get associations git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21085 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- CHANGED | 1 + FHEM/98_weekprofile.pm | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGED b/CHANGED index 6bc352953..d74fe9bc0 100644 --- a/CHANGED +++ b/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. + - bugfix: 98_weekprofile: html output for command get associations - bugfix: msgSchema: change Typo LGTV_WebOS - bugfix: 88_HMCCU: Fixed next/return bug - feature: 93_DbRep: new option "deleteOther" for minValue/maxValue available diff --git a/FHEM/98_weekprofile.pm b/FHEM/98_weekprofile.pm index 7f8e46830..509a53957 100644 --- a/FHEM/98_weekprofile.pm +++ b/FHEM/98_weekprofile.pm @@ -820,9 +820,17 @@ sub weekprofile_Get($$@) if($cmd eq "associations") { my $retType = 1; $retType = $params[0] if(@params >= 1); + # html only if FHEMWEB and canAsyncOutput + if (defined($hash->{CL})) { + $retType = ($hash->{CL}{TYPE} eq "FHEMWEB" && $hash->{CL}{canAsyncOutput}) ? $retType : 1; + } + else { + $retType = 1; + } + # dumpData($hash,"(Get): asso",$hash->{CL}) if defined($hash->{CL}); my @not_asso = (); - my @json_arr = (); - my $retHTML = "
Device | Profile | "; $retHTML .= ""; @@ -848,7 +856,7 @@ sub weekprofile_Get($$@) foreach my $devname (@not_asso) { $retHTML .= " |
---|---|
$devname |