From a856bb574a03ec70b124cf1fd5c2a815fdeed499 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 13 Jul 2021 17:22:03 +0200 Subject: [PATCH] fix empty arg array condition --- FHEM/74_GardenaSmartDevice.pm | 2 +- controls_GardenaSmartDevice.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index d2bf554..db63b3a 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -407,7 +407,7 @@ sub Set { } elsif ( lc $cmd eq 'on' || lc $cmd eq 'off' || lc $cmd eq 'on-for-timer' ) { my $val = ( - defined($aArg) && ref($aArg) eq 'ARRAY' + scalar(!@$aArg == 0) && ref($aArg) eq 'ARRAY' ? $aArg->[0] * 60 : lc $cmd ); diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 3ab01be..4507d86 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2021-06-28_15:56:58 47009 FHEM/73_GardenaSmartBridge.pm -UPD 2021-07-12_11:56:06 56210 FHEM/74_GardenaSmartDevice.pm +UPD 2021-07-13_17:21:48 56216 FHEM/74_GardenaSmartDevice.pm