diff --git a/fhem/CHANGED b/fhem/CHANGED index 0d3d5ae58..34f564a79 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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. + - feature: 44_TEK603: new attribute "disable" - change: 12_OilFox: package FHEM::OilFox - bugfix: 73_DoorBird: SessionId does not work with TransmitAudio - feature: 73_WaterCalculator: New set command to synchronize Counters diff --git a/fhem/FHEM/44_TEK603.pm b/fhem/FHEM/44_TEK603.pm index 2b844de8d..074c8b3ea 100644 --- a/fhem/FHEM/44_TEK603.pm +++ b/fhem/FHEM/44_TEK603.pm @@ -49,7 +49,7 @@ sub TEK603_Initialize($) { $hash->{DefFn} = 'TEK603_define'; $hash->{UndefFn} = 'TEK603_undef'; - $hash->{AttrList} = 'do_not_notify:0,1 dummy:1,0 loglevel:0,1,2,3,4,5,6 ' . + $hash->{AttrList} = 'do_not_notify:0,1 dummy:1,0 disable:1,0 loglevel:0,1,2,3,4,5,6 ' . $readingFnAttributes; } @@ -92,6 +92,8 @@ sub TEK603_doInit($) { my $dev = $hash->{DeviceName}; my $name = $hash->{NAME}; + return if (IsDisabled($name)); + # Wenn / enthalten ist ist es kein ser2net-Device, daher initialisieren if ($dev =~ m/\//) { @@ -139,7 +141,8 @@ sub TEK603_undef($$) { sub TEK603_ready($) { my ($hash) = @_; - + my $name = $hash->{NAME}; + return if (IsDisabled($name)); return DevIo_OpenDev($hash, 1, 'TEK603_doInit') if($hash->{STATE} eq 'disconnected'); # This is relevant for windows/USB only @@ -151,6 +154,7 @@ sub TEK603_ready($) { sub TEK603_read($) { my ($hash) = @_; my $name = $hash->{NAME}; + return if (IsDisabled($name)); my $buf = DevIo_SimpleRead($hash); return '' if(!defined($buf));