73_GardenaSmartBridge: fix part of Code

git-svn-id: https://svn.fhem.de/fhem/trunk@15173 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
CoolTux
2017-10-02 14:08:45 +00:00
parent 8e692771ce
commit 61a6643937
2 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 73_GardenaSmartBridge: fix part of code
- feature: 49_SSCam: V3.1.0, move extevent from CAM- to SVS-model, Reading
PollState enhanced, minor fixes
- change: 93_DBLog: V2.22.8, avoid multiple entries of

View File

@@ -68,7 +68,7 @@ eval "use JSON;1" or $missingModul .= "JSON ";
eval "use IO::Socket::SSL;1" or $missingModul .= "IO::Socket::SSL ";
my $version = "0.2.6";
my $version = "0.2.7";
@@ -194,14 +194,13 @@ sub GardenaSmartBridge_Attr(@) {
if( $attrName eq "disable" ) {
if( $cmd eq "set" and $attrVal eq "1" ) {
RemoveInternalTimer($hash);
RemoveInternalTimer($hash) if($init_done);
readingsSingleUpdate ( $hash, "state", "inactive", 1 );
Log3 $name, 3, "GardenaSmartBridge ($name) - disabled";
}
elsif( $cmd eq "del" ) {
RemoveInternalTimer($hash);
GardenaSmartBridge_InternalTimerGetDeviceData($hash);
GardenaSmartBridge_InternalTimerGetDeviceData($hash) if($init_done);
readingsSingleUpdate ( $hash, "state", "active", 1 );
Log3 $name, 3, "GardenaSmartBridge ($name) - enabled";
}
@@ -225,16 +224,14 @@ sub GardenaSmartBridge_Attr(@) {
return "Interval must be greater than 0"
unless($attrVal > 0);
$hash->{INTERVAL} = $attrVal;
RemoveInternalTimer($hash);
Log3 $name, 3, "GardenaSmartBridge ($name) - set interval: $attrVal";
GardenaSmartBridge_InternalTimerGetDeviceData($hash);
GardenaSmartBridge_InternalTimerGetDeviceData($hash) if($init_done);
}
elsif( $cmd eq "del" ) {
$hash->{INTERVAL} = 300;
RemoveInternalTimer($hash);
Log3 $name, 3, "GardenaSmartBridge ($name) - delete User interval and set default: 300";
GardenaSmartBridge_InternalTimerGetDeviceData($hash);
GardenaSmartBridge_InternalTimerGetDeviceData($hash) if($init_done);
}
}
@@ -271,6 +268,8 @@ sub GardenaSmartBridge_InternalTimerGetDeviceData($) {
my $name = $hash->{NAME};
RemoveInternalTimer($hash);
if( not IsDisabled($name) ) {
GardenaSmartBridge_getDevices($hash);