From 1dcde609c3dd5ff8337baf44e736b292552af885 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 26 Mar 2019 19:03:07 +0100 Subject: [PATCH] change on-for-timer time format --- 74_GardenaSmartDevice.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/74_GardenaSmartDevice.pm b/74_GardenaSmartDevice.pm index c7c6a2a..930795b 100644 --- a/74_GardenaSmartDevice.pm +++ b/74_GardenaSmartDevice.pm @@ -260,7 +260,7 @@ sub Set($@) { } elsif ( lc $cmd eq 'on' or lc $cmd eq 'off' or lc $cmd eq 'on-for-timer' ) { - my $val = ( defined($args[0]) ? join( " ", @args ) : lc $cmd ); + my $val = ( defined($args[0]) ? join(" ", @args)*60 : lc $cmd ); $payload = '"properties":{"value":"' . $val . '"}'; } @@ -316,7 +316,7 @@ sub Set($@) { if ( AttrVal( $name, 'model', 'unknown' ) eq 'ic24' ); $list .= 'refresh:temperature,light,humidity' if ( AttrVal( $name, 'model', 'unknown' ) eq 'sensor' ); - $list .= 'on:noArg off:noArg on-for-timer:slider,0,1,3600' + $list .= 'on:noArg off:noArg on-for-timer:slider,0,1,60' if ( AttrVal( $name, 'model', 'unknown' ) eq 'power' ); return "Unknown argument $cmd, choose one of $list";