From 36886231aae51d34c791dd5f4ee93826cc1cf7c0 Mon Sep 17 00:00:00 2001 From: Starkstrombastler <> Date: Fri, 6 Sep 2024 17:03:09 +0000 Subject: [PATCH] 36_Shelly: removed use Sub::Util git-svn-id: https://svn.fhem.de/fhem/trunk@29128 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/36_Shelly.pm | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index b8539be3a..9624738cf 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 + - bugfix: 36_Shelly: removed package command: use Sub::Util - bugfix: 36_Shelly: added package command: use Sub::Util - bugfix: 38_netatmo: changed token refresh to internal reading - feature: 70_PylonLowVoltage: new attr waitTimeBetweenRS485Cmd diff --git a/fhem/FHEM/36_Shelly.pm b/fhem/FHEM/36_Shelly.pm index 91e012f83..2be3b72c2 100644 --- a/fhem/FHEM/36_Shelly.pm +++ b/fhem/FHEM/36_Shelly.pm @@ -103,6 +103,7 @@ # 6.00.1 fix: selection of readings for command 'set clear responsetimes' improved; Debug commands removed # 6.00.2 fix: reading ble (bluetooth) may be set to disabled # 6.00.3 fix: use Sub::Util added +# 6.00.4 fix: removed the use of Sub::Util # to do roller: get maxtime open/close from shelly # get status on stopp even when interval == 0 @@ -125,7 +126,7 @@ sub Log($$); sub Shelly_Set ($@); #-- globals on start -my $version = "6.00.3 02.09.2024"; +my $version = "6.00.4 06.09.2024"; my $defaultINTERVAL = 60; my $multiplyIntervalOnError = 1.0; # mechanism disabled if value=1 @@ -6360,6 +6361,7 @@ sub Shelly_HttpRequest(@){ hash => $hash, callback => \&Shelly_HttpResponse, function => \&$function, + funcname => $function, comp => $comp, val => $val, request => time() @@ -6464,9 +6466,9 @@ sub Shelly_HttpResponse($){ Shelly_error_handling($hash,"Shelly_HttpResponse:code","$err: $msg",2); return; } - Log3 $name,4,"[Shelly_HttpResponse] $name: forwarding JSON-Hash to func: ".Sub::Util::subname($param->{function}); + Log3 $name,4,"[Shelly_HttpResponse] $name: forwarding JSON-Hash to func: ".$param->{funcname}; # calling the sub() forwarded by $param - $param->{function}($param,$jhash); + $param->{function}->($param,$jhash); }else{ Log3 $name,4,"[Shelly_HttpResponse] ERROR haven't error neither data for $name"; } @@ -6490,7 +6492,7 @@ sub Shelly_HttpResponse($){ define <name> Shelly <IP address>[:port] [[user:]password]
Defines the Shelly device.

Notes: