10_FBDECT.pm: Fix toggle warning (Forum #102606)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19906 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-07-28 17:58:01 +00:00
parent 73a219f2ad
commit 39e30ef1bc

View File

@ -109,7 +109,7 @@ FBDECT_SetHttp($@)
if($cmd =~ m/^(on|off|toggle)$/) {
IOWrite($hash, ReadingsVal($name,"AIN",0), "setswitch$cmd");
my $state = ($cmd eq "toggle" ? ($hash->{state} eq "on" ? "off":"on"):$cmd);
my $state = ($cmd eq "toggle" ? ($hash->{STATE} eq "on" ? "off":"on"):$cmd);
readingsSingleUpdate($hash, "state", $state, 1);
return undef;
}