2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

74_GardenaSmartDevice: change on-for-timer time format

git-svn-id: https://svn.fhem.de/fhem/trunk@19042 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2019-03-26 18:05:07 +00:00
parent c9d1bf1e2c
commit dcaaabfef5
2 changed files with 3 additions and 2 deletions

View File

@ -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.
- change: 74_GardenaSmartDevice: change on-for-timer time format
- feature: 74_GardenaSmartDevice: add support for power plug and META
- feature: 73_GardenaSmartBridge: add support for power plug and META
- feature: 42_AptToDate: add support for META and Installer Modules

View File

@ -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";