From 878f9c602db7c1871d778b7a0ca0de3c50a5943f Mon Sep 17 00:00:00 2001 From: Icinger <> Date: Sun, 9 Sep 2018 07:38:20 +0000 Subject: [PATCH] 46_PW_Circle: Added toggle-command git-svn-id: https://svn.fhem.de/fhem/trunk@17301 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/46_PW_Circle.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/46_PW_Circle.pm b/fhem/FHEM/46_PW_Circle.pm index 17f041c03..839a9e8aa 100755 --- a/fhem/FHEM/46_PW_Circle.pm +++ b/fhem/FHEM/46_PW_Circle.pm @@ -126,7 +126,10 @@ sub PW_Circle_Set($@) if($opt eq "on"||$opt eq "off") { IOWrite($hash,$hash->{CODE},$opt); - } elsif($opt =~ "(on|off)-for-timer") + } elsif ($opt eq "toggle") { + $opt = ReadingsVal($name,"state","off") eq "off" ? "on" : "off"; + IOWrite($hash,$hash->{CODE},$opt); + }elsif($opt =~ "(on|off)-for-timer") { if (@a == 1) { IOWrite($hash,$hash->{CODE},$1);