From 15f4318ad0f3a444ecc323053fca2623bb426efa Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 16 Feb 2016 21:59:41 +0100 Subject: [PATCH] =?UTF-8?q?Codecleaning,=20bugfixing=20set=20in=20Abh?= =?UTF-8?q?=C3=A4ngigkeit=20von=20Attributen,=20nicht=20ben=C3=B6tigte=20C?= =?UTF-8?q?odeteile=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 74_AMAD.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/74_AMAD.pm b/74_AMAD.pm index b5d3f3b..0475aa9 100644 --- a/74_AMAD.pm +++ b/74_AMAD.pm @@ -37,7 +37,7 @@ use TcpServerUtils; use Encode qw(encode); -my $version = "1.9.4"; +my $version = "1.9.6"; @@ -461,13 +461,13 @@ sub AMAD_Set($$@) { $list .= "mediaPlayer:play,stop,next,back " if( ReadingsVal( $bname, "fhemServerIP", "none" ) ne "none"); $list .= "screenBrightness:slider,0,1,255 "; $list .= "screen:on,off,lock,unlock "; - $list .= "screenOrientation:auto,landscape,portrait " if( AttrVal( $name, "setScreenOrientation", "1" ) eq "1" ); - $list .= "screenFullscreen:on,off " if( AttrVal( $name, "setFullscreen", "1" ) eq "1" ); + $list .= "screenOrientation:auto,landscape,portrait " if( AttrVal( $name, "setScreenOrientation", "0" ) eq "1" ); + $list .= "screenFullscreen:on,off " if( AttrVal( $name, "setFullscreen", "0" ) eq "1" ); $list .= "openURL "; $list .= "openApp:$apps " if( AttrVal( $name, "setOpenApp", "none" ) ne "none" ); $list .= "nextAlarmTime:time "; $list .= "statusRequest:noArg "; - $list .= "system:reboot,shutdown,airplanemodeON " if( AttrVal( $name, "root", "1" ) eq "1" ); + $list .= "system:reboot,shutdown,airplanemodeON " if( AttrVal( $name, "root", "0" ) eq "1" ); $list .= "bluetooth:on,off "; $list .= "notifySndFile "; $list .= "clearNotificationBar:All,Automagic "; @@ -623,7 +623,6 @@ sub AMAD_SelectSetCmd($$@) { my $url = "http://" . $host . ":" . $port . "/fhem-amad/setCommands/screenlock?lockmod=".$mod."&lockPIN=".$PIN; - readingsSingleUpdate( $hash, "screenLock", $mod, 1 ); return AMAD_HTTP_POST( $hash,$url ); } }