From f5e60053f5a64570e9b742971d8d69ae2b08b0c8 Mon Sep 17 00:00:00 2001 From: mahowi <> Date: Thu, 12 Mar 2020 10:50:52 +0000 Subject: [PATCH] =?UTF-8?q?59=5FWUup.pm:=20use=20UConv=20to=20calculate=20?= =?UTF-8?q?solarradiation=20from=20lux=20to=20W/m=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.fhem.de/fhem/trunk@21411 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/59_WUup.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index d127fc9cc..04619d63a 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: 59_WUup: use UConv to calculate solarradiation from lux to W/m² - change: 74_AMADDevice: add logreport is attribut fhemServerIP not set - change: 93_DbRep: better logfile messages in some cases of index operation - feature: 44_TEK603: new attribute "disable" diff --git a/fhem/FHEM/59_WUup.pm b/fhem/FHEM/59_WUup.pm index 728ced14b..fc4031379 100644 --- a/fhem/FHEM/59_WUup.pm +++ b/fhem/FHEM/59_WUup.pm @@ -33,7 +33,7 @@ use HttpUtils; use UConv; use FHEM::Meta; -my $version = "0.9.12"; +my $version = "0.9.13"; # Declare functions sub WUup_Initialize($); @@ -280,7 +280,7 @@ sub WUup_send($) { if ( $attr{$name}{unit_solarradiation} eq "lux" ) { Log3 $name, 5, "WUup ($name) - solarradiation unit is lux"; - $value = ( $value / 126.7 ); + $value = UConv::lux2wpsm( $value, $rnd ); } else { Log3 $name, 5, "WUup ($name) - solarradiation unit is W/m²"; @@ -378,6 +378,7 @@ sub WUup_receive($) { # 2019-07-04 replaced link to API documentation # 2019-07-05 add Meta support # 2019-07-09 add WIKI to Meta data +# 2020-03-12 use UConv to calculate solarradiation from lux to W/m² # ################################################################################