statusRequest every time

This commit is contained in:
Marko Oldenburg 2016-12-09 21:30:56 +01:00
parent b3e2d8f20e
commit 94e23ab359

View File

@ -37,7 +37,7 @@ use TcpServerUtils;
use Encode qw(encode); use Encode qw(encode);
my $modulversion = "2.6.6"; my $modulversion = "2.6.7";
my $flowsetversion = "2.6.7"; my $flowsetversion = "2.6.7";
@ -590,13 +590,14 @@ sub AMAD_Set($$@) {
Log3 $name, 5, "AMAD ($name) - set $name $cmd ".join(" ", @val); Log3 $name, 5, "AMAD ($name) - set $name $cmd ".join(" ", @val);
return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( lc $cmd eq 'statusrequest' );
return "set command only works if state not equal initialized" if( ReadingsVal( $hash->{NAME}, "state", 0 ) eq "initialized"); return "set command only works if state not equal initialized" if( ReadingsVal( $hash->{NAME}, "state", 0 ) eq "initialized");
return "Cannot set command, FHEM Device is disabled" if( AttrVal( $name, "disable", "0" ) eq "1" ); return "Cannot set command, FHEM Device is disabled" if( AttrVal( $name, "disable", "0" ) eq "1" );
return "Cannot set command, FHEM Device is unknown" if( ReadingsVal( $name, "deviceState", "online" ) eq "unknown" ); return "Cannot set command, FHEM Device is unknown" if( ReadingsVal( $name, "deviceState", "online" ) eq "unknown" );
return "Cannot set command, FHEM Device is offline" if( ReadingsVal( $name, "deviceState", "online" ) eq "offline" ); return "Cannot set command, FHEM Device is offline" if( ReadingsVal( $name, "deviceState", "online" ) eq "offline" );
return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( @val ) || ( lc $cmd eq 'statusrequest' ) || ( lc $cmd eq 'activatevoiceinput' ) || ( lc $cmd eq 'vibrate' ) || ( lc $cmd eq 'currentflowsetupdate' ); return AMAD_SelectSetCmd( $hash, $cmd, @val ) if( @val ) || ( lc $cmd eq 'activatevoiceinput' ) || ( lc $cmd eq 'vibrate' ) || ( lc $cmd eq 'currentflowsetupdate' );
} }
return "Unknown argument $cmd, bearword as argument or wrong parameter(s), choose one of $list"; return "Unknown argument $cmd, bearword as argument or wrong parameter(s), choose one of $list";