From 3a9bf09c886f2ce08f1951dbc41736c309586d0b Mon Sep 17 00:00:00 2001 From: arnoaugustin <> Date: Wed, 5 Oct 2016 09:45:28 +0000 Subject: [PATCH] 51_I2C_BH1750.pm: fixed poll_interval checking, added 0.1 min. intervall, added pod summary git-svn-id: https://svn.fhem.de/fhem/trunk@12274 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/51_I2C_BH1750.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/51_I2C_BH1750.pm b/fhem/FHEM/51_I2C_BH1750.pm index 91af1755d..80a36cf0c 100644 --- a/fhem/FHEM/51_I2C_BH1750.pm +++ b/fhem/FHEM/51_I2C_BH1750.pm @@ -110,7 +110,7 @@ sub I2C_BH1750_Initialize($) $hash->{AttrFn} = "I2C_BH1750_Attr"; $hash->{SetFn} = "I2C_BH1750_Set"; $hash->{I2CRecFn} = 'I2C_BH1750_I2CRec'; - $hash->{AttrList} = "poll_interval:0.2,0.5,1,2,5,10,20,30,60 IODev percentdelta correction ". + $hash->{AttrList} = "poll_interval:0.1,0.2,0.5,1,2,5,10,20,30,60 IODev percentdelta correction ". $readingFnAttributes; $hash->{VERSION} = '$Id$'; } @@ -209,8 +209,8 @@ sub I2C_BH1750_Attr (@) $hash->{BASEINTERVAL} = 0; $hash->{PollState} = BH1750_POLLSTATE_IDLE; } else { - if($val !~ /^\d+$/ or $val < 1) { - return $error."needs interger value"; + if($val !~ /^\d+/) { + return $error."needs numeric value"; } else { $hash->{BASEINTERVAL} = 60*$val; I2C_BH1750_Restart_Measure($hash,$hash->{RESTARTDELAY}); @@ -510,6 +510,9 @@ sub I2C_BH1750_sleep 1; =pod +=item device +=item summary support for the BH1750 I2C light sensor +=item summary_DE Unterstützung für den BH1750 I2C Lichtsensor =begin html @@ -602,7 +605,7 @@ sub I2C_BH1750_sleep