mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 04:36:02 +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:
parent
37fc99e320
commit
eea81747ee
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user