From 9aa08bb2cc2aa7461c50fd62d44779db3f9d9cf8 Mon Sep 17 00:00:00 2001 From: icinger <> Date: Wed, 11 Nov 2015 15:42:54 +0000 Subject: [PATCH] 46_PW_Circle:Fixed small bug in on/off-for-timer git-svn-id: https://svn.fhem.de/fhem/trunk@9858 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/46_PW_Circle.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/46_PW_Circle.pm b/fhem/FHEM/46_PW_Circle.pm index 48b6efa82..a4314b227 100755 --- a/fhem/FHEM/46_PW_Circle.pm +++ b/fhem/FHEM/46_PW_Circle.pm @@ -22,7 +22,7 @@ # The GNU General Public License may also be found at http://www.gnu.org/licenses/gpl-2.0.html . ################################### # -# $Id: 46_PW_Circle.pm 0037 2015-11-09 19:18:38Z sguttmann $ +# $Id: 46_PW_Circle.pm 0038 2015-11-11 16:18:38Z sguttmann $ package main; use strict; @@ -47,7 +47,7 @@ sub PW_Circle_Initialize($) { my ($hash) = @_; - $hash->{Match} = "Circle"; + $hash->{Match} = "PW_Circle"; $hash->{DefFn} = "PW_Circle_Define"; $hash->{UndefFn} = "PW_Circle_Undef"; $hash->{ParseFn} = "PW_Circle_Parse"; @@ -56,7 +56,7 @@ sub PW_Circle_Initialize($) $hash->{AttrList} = "IODev interval do_not_notify:1,0 ". $readingFnAttributes; $hash->{AutoCreate} = - { "Circle.*" => { ATTR => "room:Plugwise interval:10"} }; + { "PW_Circle.*" => { ATTR => "room:Plugwise interval:10"} }; # Log3 $hash, 3, "PW_Circle_Initialize() Initialize"; } @@ -67,11 +67,11 @@ sub PW_Circle_Define($$) my ($hash, $def) = @_; my @a = split("[ \t][ \t]*", $def); my $a = int(@a); -Log 3,"Circle define $a[0]"; +#Log 3,"Circle define $a[0]"; return "wrong syntax: define PW_Circle address" if(int(@a) != 3); my $name = $a[0]; my $code = $a[2]; - my $device_name = "Circle".$DOT.$code; + my $device_name = "PW_Circle".$DOT.$code; #Log 3,Dumper($hash); $hash->{CODE} = $code; @@ -128,7 +128,7 @@ sub PW_Circle_Set($@) IOWrite($hash,$hash->{CODE},$opt); } elsif($opt =~ "(on|off)-for-timer") { - if (@a == 3) { + if (@a == 1) { IOWrite($hash,$hash->{CODE},$1); RemoveInternalTimer("onofffortimer:".$name.":off"); RemoveInternalTimer("onofffortimer:".$name.":on"); @@ -191,7 +191,7 @@ if ($msg->{type} eq "err") {return undef}; $time_old = $time; Log3 $hash,5, Dumper($msg); - my $device_name = "Circle".$DOT.$msg->{short}; + my $device_name = "PW_Circle".$DOT.$msg->{short}; Log3 $hash,5,"New Devicename: $device_name"; my $def = $modules{PW_Circle}{defptr}{"$device_name"}; if(!$def) {