2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_freezemon.pm: Unwrap Log3 when disabled

git-svn-id: https://svn.fhem.de/fhem/trunk@16534 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
KernSani 2018-04-02 15:54:34 +00:00
parent ee9a5d394d
commit 372dfd67fa

View File

@ -22,6 +22,7 @@
#
##############################################################################
# Changelog:
# 0.0.19: unwrap Log3 function when set inactive
# 0.0.18: fixed unnecessary call of blocking function
# 0.0.17: fixed Warning when fm_logFile is not maintained
# Freeze-Handling non-blocking
@ -85,7 +86,7 @@ use Time::HiRes qw(tv_interval);
use B qw(svref_2object);
use Blocking;
my $version = "0.0.18";
my $version = "0.0.19";
my @logqueue = ();
###################################
@ -438,6 +439,9 @@ sub freezemon_Set($@) {
RemoveInternalTimer($hash);
readingsSingleUpdate( $hash, "state", "inactive", 1 );
$hash->{helper}{DISABLED} = 1;
my $status = Log3( "", 100, "" );
Log3( "", 0, "[Freezemon] $name: Unwrapping Log3" );
*main::Log3 = $hash->{helper}{Log3};
}
elsif ( $cmd eq "active" ) {
if ( IsDisabled($name) ) {
@ -594,6 +598,9 @@ sub freezemon_Attr($) {
RemoveInternalTimer($hash);
readingsSingleUpdate( $hash, "state", "inactive", 1 );
$hash->{helper}{DISABLED} = 1;
my $status = Log3( "", 100, "" );
Log3( "", 0, "[Freezemon] $name: Unwrapping Log3" );
*main::Log3 = $hash->{helper}{Log3};
}
elsif ( $aVal == 0 ) {
freezemon_start($hash);