mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
00_MYSENSORS: 'use' cleanup
git-svn-id: https://svn.fhem.de/fhem/trunk@24683 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3d592b415b
commit
e9073c7740
@ -36,6 +36,8 @@ use Exporter ('import');
|
||||
|
||||
use DevIo;
|
||||
use GPUtils qw(:all);
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
|
||||
sub main::MYSENSORS_Initialize { goto &Initialize };
|
||||
|
||||
@ -70,11 +72,11 @@ sub Initialize {
|
||||
|
||||
my @attrList = (
|
||||
'disable:0,1',
|
||||
'first-sensorid:selectnumbers,1,1,255,0,lin',
|
||||
'last-sensorid:selectnumbers,2,1,255,0,lin',
|
||||
qw(
|
||||
autocreate:1
|
||||
requestAck:1
|
||||
first-sensorid:selectnumbers,1,1,255,0,lin
|
||||
last-sensorid:selectnumbers,2,1,255,0,lin
|
||||
stateFormat
|
||||
OTA_firmwareConfig
|
||||
)
|
||||
@ -91,7 +93,6 @@ BEGIN { GP_Import(
|
||||
CommandDefine
|
||||
CommandModify
|
||||
CommandAttr
|
||||
gettimeofday
|
||||
readingsSingleUpdate
|
||||
DevIo_OpenDev
|
||||
DevIo_SimpleWrite
|
||||
@ -103,7 +104,6 @@ BEGIN { GP_Import(
|
||||
Log3
|
||||
FileRead
|
||||
IsDisabled
|
||||
looks_like_number
|
||||
)
|
||||
)
|
||||
};
|
||||
@ -117,7 +117,7 @@ my %sensorAttr = (
|
||||
sub Define {
|
||||
my $hash = shift // return;
|
||||
|
||||
InternalTimer(time(), "MYSENSORS::Start", $hash,0);
|
||||
InternalTimer(time, 'MYSENSORS::Start', $hash,0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -806,7 +806,7 @@ sub getFirmwareTypes {
|
||||
|
||||
my $name = $hash->{NAME};
|
||||
return @{$hash->{'.fwList'}} if !$mode && defined $hash->{'.fwList'};
|
||||
return 'OTA_firmwareConfig_not_set_in_gateway' if !$mode && !defined $hash->{'.fwList'};
|
||||
return 'OTA_firmwareConfig_not_valid_at_GW' if !$mode && !defined $hash->{'.fwList'};
|
||||
my @fwTypes = ();
|
||||
if (defined($filename)) {
|
||||
my ($err, @lines) = FileRead({FileName => "./FHEM/firmware/$filename",
|
||||
|
Loading…
x
Reference in New Issue
Block a user