mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
ENIGMA2: fix integer check for msg command
git-svn-id: https://svn.fhem.de/fhem/trunk@5048 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c0c3a0eb22
commit
1f80f62cb0
@ -24,7 +24,7 @@
|
|||||||
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Version: 1.3.1
|
# Version: 1.3.2
|
||||||
#
|
#
|
||||||
# Major Version History:
|
# Major Version History:
|
||||||
# - 1.3.0 - 2013-12-21
|
# - 1.3.0 - 2013-12-21
|
||||||
@ -326,9 +326,9 @@ sub ENIGMA2_Set($@) {
|
|||||||
|
|
||||||
# on
|
# on
|
||||||
elsif ( $a[1] eq "on" ) {
|
elsif ( $a[1] eq "on" ) {
|
||||||
Log3 $name, 2, "ENIGMA2 set $name " . $a[1];
|
|
||||||
|
|
||||||
if ( $hash->{READINGS}{state}{VAL} eq "absent" ) {
|
if ( $hash->{READINGS}{state}{VAL} eq "absent" ) {
|
||||||
|
Log3 $name, 2, "ENIGMA2 set $name " . $a[1] . " (wakeup)";
|
||||||
|
|
||||||
if ( defined( $hash->{READINGS}{lanmac}{VAL} )
|
if ( defined( $hash->{READINGS}{lanmac}{VAL} )
|
||||||
&& $hash->{READINGS}{lanmac}{VAL} ne "-" )
|
&& $hash->{READINGS}{lanmac}{VAL} ne "-" )
|
||||||
{
|
{
|
||||||
@ -340,6 +340,8 @@ sub ENIGMA2_Set($@) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Log3 $name, 2, "ENIGMA2 set $name " . $a[1];
|
||||||
|
|
||||||
$cmd = "newstate=4";
|
$cmd = "newstate=4";
|
||||||
$result = ENIGMA2_SendCommand( $hash, "powerstate", $cmd, "on" );
|
$result = ENIGMA2_SendCommand( $hash, "powerstate", $cmd, "on" );
|
||||||
}
|
}
|
||||||
@ -452,8 +454,8 @@ sub ENIGMA2_Set($@) {
|
|||||||
return
|
return
|
||||||
"Argument "
|
"Argument "
|
||||||
. $_
|
. $_
|
||||||
. " is not a valid integer between 5 and 49680"
|
. " is not a valid integer between 0 and 49680"
|
||||||
if ( !m/^\d+$/ || $_ < 5 || $_ > 49680 );
|
if ( !m/^\d+$/ || $_ < 0 || $_ > 49680 );
|
||||||
|
|
||||||
my $i = 4;
|
my $i = 4;
|
||||||
my $text = $a[$i];
|
my $text = $a[$i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user