Fehlermeldung "Argument "" isn't numeric..." in 59_Weather.pm

Begonnen von housekeeper, 01 April 2013, 07:38:23

Vorheriges Thema - Nächstes Thema

housekeeper

Diese Fehlermeldung

Argument "" isn't numeric in addition (+) at .//FHEM/59_Weather.pm line 159, <$fh> line 369.


erscheint neuerdings häufiger im shell log meiner Fritz!Box 7390.

$Id: 59_Weather.pm 2676 2013-02-09 18:00:11Z borisneubert $

was ist davon zu halten ?

sub degrees_to_direction($@) {
   my ($degrees,@directions_txt_i18n) = @_;
   my $mod = int((($degrees + 11.25) % 360) / 22.5);                      # <---- Zeile 159
   return $directions_txt_i18n[$mod];
}


sub Weather_Get($@) {

  my ($hash, @a) = @_;

  return "argument is missing" if(int(@a) != 2);

  $hash->{LOCAL} = 1;
  Weather_GetUpdate($hash);
  delete $hash->{LOCAL};

  my $reading= $a[1];                            
  my $value;                                # <--- Zeile 369

  if(defined($hash->{READINGS}{$reading})) {
        $value= $hash->{READINGS}{$reading}{VAL};
  } else {
        return "no such reading: $reading";
  }

  return "$a[0] $reading => $value";
}