diff --git a/FHEM/13_KS300.pm b/FHEM/13_KS300.pm index f924ed0d2..dc3176cbf 100644 --- a/FHEM/13_KS300.pm +++ b/FHEM/13_KS300.pm @@ -28,9 +28,18 @@ KS300_Initialize($) $hash->{DefFn} = "KS300_Define"; $hash->{UndefFn} = "KS300_Undef"; $hash->{ParseFn} = "KS300_Parse"; - $hash->{AttrList} = "IODev do_not_notify:0,1 showtime:0,1 model:ks300 ". - "rainadjustment:0,1 ignore:0,1 ". - $readingFnAttributes; + no warnings 'qw'; + my @attrList = qw( + IODev + do_not_notify:0,1 + ignore:0,1 + model:ks300 + rainadjustment:0,1 + strangeTempDiff + showtime:0,1 + ); + use warnings 'qw'; + $hash->{AttrList} = join(" ", @attrList)." ".$readingFnAttributes; $hash->{AutoCreate}= { "KS300.*" => { GPLOT => "temp4rain10:Temp/Rain,hum6wind8:Wind/Hum,", @@ -202,6 +211,12 @@ KS300_Parse($$) $v[8] = $a[17]; $v[9] = KS300_windIndex($v[2]); + my $std = AttrVal($name, "strangeTempDiff", 0); + if($std) { + my $ov = ReadingsVal($name, 'temperature', 0); + return "" if($ov && abs($ov-$v[4]) > $std); + } + # Negative temp $v[4] = -$v[4] if(hex($v[8]) & 8); @@ -375,6 +390,10 @@ KS300_windIndex($)
  • do_not_notify
  • showtime
  • model (ks300)
  • +
  • strangeTempDiff DIFFVAL
    + If set, the module will only accept data where the difference between + the reported temperature and tha last recorded value is less than + DIFFVAL.
  • rainadjustment
    If this attribute is set, fhem automatically considers rain counter resets after a battery change and random counter switches as @@ -444,6 +463,10 @@ KS300_windIndex($) berücksichtigt. Resets treten beim Wechsel der Batterie und nach Beobachtung einiger Benutzer auch nach zufälligen Schaltzyklen auf. Die Voreinstellung ist 0 (aus).
  • +
  • strangeTempDiff DIFFVAL
    + Falls gesetzt, werden nur solche Telegramme akzeptiert, wo der + Unterschied bei der gemeldeten Temperatur zum letzten Wert weniger als + DIFFVAL ist.