mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
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:
parent
73a219f2ad
commit
39e30ef1bc
@ -109,7 +109,7 @@ FBDECT_SetHttp($@)
|
|||||||
|
|
||||||
if($cmd =~ m/^(on|off|toggle)$/) {
|
if($cmd =~ m/^(on|off|toggle)$/) {
|
||||||
IOWrite($hash, ReadingsVal($name,"AIN",0), "setswitch$cmd");
|
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);
|
readingsSingleUpdate($hash, "state", $state, 1);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user