From e8c553161c3b35144c9345ede61e1d4de7685b39 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 26 Mar 2019 11:14:52 +0100 Subject: [PATCH] fix FHEM crash --- 73_GardenaSmartBridge.pm | 4 ++-- 74_GardenaSmartDevice.pm | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/73_GardenaSmartBridge.pm b/73_GardenaSmartBridge.pm index da3c847..64f2359 100644 --- a/73_GardenaSmartBridge.pm +++ b/73_GardenaSmartBridge.pm @@ -58,7 +58,7 @@ package main; use strict; use warnings; -my $version = "1.4.1"; +my $version = "1.4.2"; sub GardenaSmartBridge_Initialize($) { @@ -470,7 +470,7 @@ sub ErrorHandling($$$) { readingsBulkUpdate( $dhash, "state", "the command is processed", 1 ); - InternalTimer( gettimeofday() + 5, "GardenaSmartBridge::getDevices", $hash, 1 ); + InternalTimer( gettimeofday() + 5, "FHEM::GardenaSmartBridge::getDevices", $hash, 1 ); } elsif ( $param->{code} != 200 ) { diff --git a/74_GardenaSmartDevice.pm b/74_GardenaSmartDevice.pm index 32c764e..34af644 100644 --- a/74_GardenaSmartDevice.pm +++ b/74_GardenaSmartDevice.pm @@ -58,7 +58,7 @@ package main; use strict; use warnings; -my $version = "1.4.1"; +my $version = "1.4.2"; sub GardenaSmartDevice_Initialize($) { @@ -557,6 +557,14 @@ sub WriteReadings($$) { ) ) ) if ( AttrVal( $name, 'model', 'unknown' ) eq 'ic24' ); + + readingsBulkUpdate( + $hash, 'state', + ReadingsVal( + $name, 'power-power_timer', + 'no info from power-timer' + ) + ) if ( AttrVal( $name, 'model', 'unknown' ) eq 'power' ); readingsEndUpdate( $hash, 1 );