From 4cccd0d32d6434cec9f11fea0a15187a94e748be Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Fri, 2 Jun 2017 23:09:53 +0200 Subject: [PATCH] InternalTimer --- 46_SmartPi.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/46_SmartPi.pm b/46_SmartPi.pm index e29a50c..6767419 100644 --- a/46_SmartPi.pm +++ b/46_SmartPi.pm @@ -232,9 +232,7 @@ sub SmartPi_Get($@) { return "Unknown argument $cmd, choose one of $list"; } - - - readingsSingleUpdate($hash,'state','fetch data',1); + SmartPi_GetData($hash,$phaseId,$valueId); @@ -268,7 +266,9 @@ sub SmartPi_GetData($@) { my $port = $hash->{PORT}; my $uri = $host . ':' . $port . '/api/' . $phaseId . '/' . $valueId . '/now'; - + + + readingsSingleUpdate($hash,'state','fetch data',1); HttpUtils_NonblockingGet( {