2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 01:06:04 +00:00

44_TEK603: new attribute "disable"

git-svn-id: https://svn.fhem.de/fhem/trunk@21403 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
eisler 2020-03-09 21:22:09 +00:00
parent 37fc99e320
commit eea81747ee
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # Do not insert empty lines here, update check depends on it.
- feature: 44_TEK603: new attribute "disable"
- change: 12_OilFox: package FHEM::OilFox - change: 12_OilFox: package FHEM::OilFox
- bugfix: 73_DoorBird: SessionId does not work with TransmitAudio - bugfix: 73_DoorBird: SessionId does not work with TransmitAudio
- feature: 73_WaterCalculator: New set command to synchronize Counters - feature: 73_WaterCalculator: New set command to synchronize Counters

View File

@ -49,7 +49,7 @@ sub TEK603_Initialize($) {
$hash->{DefFn} = 'TEK603_define'; $hash->{DefFn} = 'TEK603_define';
$hash->{UndefFn} = 'TEK603_undef'; $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; $readingFnAttributes;
} }
@ -92,6 +92,8 @@ sub TEK603_doInit($) {
my $dev = $hash->{DeviceName}; my $dev = $hash->{DeviceName};
my $name = $hash->{NAME}; my $name = $hash->{NAME};
return if (IsDisabled($name));
# Wenn / enthalten ist ist es kein ser2net-Device, daher initialisieren # Wenn / enthalten ist ist es kein ser2net-Device, daher initialisieren
if ($dev =~ m/\//) if ($dev =~ m/\//)
{ {
@ -139,7 +141,8 @@ sub TEK603_undef($$) {
sub TEK603_ready($) { sub TEK603_ready($) {
my ($hash) = @_; my ($hash) = @_;
my $name = $hash->{NAME};
return if (IsDisabled($name));
return DevIo_OpenDev($hash, 1, 'TEK603_doInit') if($hash->{STATE} eq 'disconnected'); return DevIo_OpenDev($hash, 1, 'TEK603_doInit') if($hash->{STATE} eq 'disconnected');
# This is relevant for windows/USB only # This is relevant for windows/USB only
@ -151,6 +154,7 @@ sub TEK603_ready($) {
sub TEK603_read($) { sub TEK603_read($) {
my ($hash) = @_; my ($hash) = @_;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
return if (IsDisabled($name));
my $buf = DevIo_SimpleRead($hash); my $buf = DevIo_SimpleRead($hash);
return '' if(!defined($buf)); return '' if(!defined($buf));