Autor Thema: DECT200, PERL WARNING: Argument "0.00 W" isn't numeric in numeric...  (Gelesen 1526 mal)

Offline heinzfo

  • Full Member
  • ***
  • Beiträge: 310
Hallo

Ich komme nicht darauf warum es zu diesem Warning kommt und wie man es lösen kann.
Im LogFile steht das ca. alle 5min.
Das Reading kommt von einer DECT200, auch Werte > 0.00 zeigen das Warning.

2016.08.21 10:52:59 1: PERL WARNING: Argument "0.00 W" isn't numeric in numeric ge (>=) at (eval 731) line 1.
2016.08.21 10:52:59 3: eval: my $TYPE='FBDECT';my $SELF='PedelecActionOn';my $EVTPART0='power:';my $EVENT='power: 0.00 W';my $EVTPART2='W';my $NAME='FBDECT_FB7390_SmartHome_08761_0018325';my $EVTPART1='0.00';{ fhem ("set PedelecAction on; trigger PedelecAutoOff defined") if (ReadingsVal("FBDECT_FB7390_SmartHome_08761_0018325","power","") >= 10 && Value("PedelecAction") ne "on")}

2016.08.21 10:52:59 1: PERL WARNING: Argument "0.00 W" isn't numeric in numeric le (<=) at (eval 732) line 1.
2016.08.21 10:52:59 3: eval: my $EVTPART0='power:';my $EVENT='power: 0.00 W';my $TYPE='FBDECT';my $SELF='PedelecHighConsumptionOff';my $EVTPART1='0.00';my $EVTPART2='W';my $NAME='FBDECT_FB7390_SmartHome_08761_0018325';{ fhem ("set PedelecHighConsumption off; trigger PedelecAutoStandby defined") if (ReadingsVal("FBDECT_FB7390_SmartHome_08761_0018325","power","") <= 2 && Value("PedelecAction") eq "on")}

2016.08.21 10:52:59 1: PERL WARNING: Argument "0.00 W" isn't numeric in numeric gt (>) at (eval 733) line 1.
2016.08.21 10:52:59 3: eval: my $EVTPART0='power:';my $EVENT='power: 0.00 W';my $TYPE='FBDECT';my $SELF='PedelecHighConsumptionOn';my $EVTPART1='0.00';my $EVTPART2='W';my $NAME='FBDECT_FB7390_SmartHome_08761_0018325';{ fhem ("set PedelecHighConsumption on; trigger PedelecAutoStandby defined") if (ReadingsVal("FBDECT_FB7390_SmartHome_08761_0018325","power","") > 2 && Value("PedelecAction") eq "on")}

Beste Grüße
Heinz

Offline rudolfkoenig

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 19499
Es kommt zur Warnung, weil "0.00 W" keine Zahl ist.
Man loest es indem man ReadingsNum verwendet statt ReadingsVal
Gefällt mir Gefällt mir x 1 Liste anzeigen

Offline heinzfo

  • Full Member
  • ***
  • Beiträge: 310
Danke, das war die Lösung  ;)