From fbb9b87d00b2af292a3de7d2a8d1eaff882e87af Mon Sep 17 00:00:00 2001
From: Risiko <>
Date: Wed, 17 Feb 2021 18:54:21 +0000
Subject: [PATCH] =?UTF-8?q?98=5Fweekprofile:=20don't=20display=20'=C2=B0C'?=
 =?UTF-8?q?=20by=20temperature=20keywords?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

git-svn-id: https://svn.fhem.de/fhem/trunk@23761 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
 fhem/CHANGED                         | 1 +
 fhem/www/pgm2/fhemweb_weekprofile.js | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/fhem/CHANGED b/fhem/CHANGED
index 23b28d791..128299550 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.
+ - change:  98_weekprofile: don't display '°C' by temperature keywords
  - change:  70_CanOverEthernet: changed indirect object notation (Perl 7 comp)
  - change:  70_ZoneMinder: fixed authentication for 1.34.x, API 2.0
  - feature: 98_weekprofile: custom temperature keywords
diff --git a/fhem/www/pgm2/fhemweb_weekprofile.js b/fhem/www/pgm2/fhemweb_weekprofile.js
index fbae20b85..53b7e99f6 100644
--- a/fhem/www/pgm2/fhemweb_weekprofile.js
+++ b/fhem/www/pgm2/fhemweb_weekprofile.js
@@ -409,7 +409,11 @@ function FW_weekprofileShow(widget)
       
       $(tr).append('<td>'+str+ '</td>');
       
-      str = widget.PROFILE[shortDays[i]]['temp'][k]+' °C';
+      str = widget.PROFILE[shortDays[i]]['temp'][k];
+      var tempV = parseFloat(str);
+      if(!isNaN(tempV)) {
+        str += ' °C';
+      }
       $(tr).append('<td>'+str+ '</td>');
     }
   }