FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: is2late am 03 Januar 2025, 18:52:24

Titel: (GELÖST) warning condition c01: Argument "" isn't numeric in numeric lt (<)
Beitrag von: is2late am 03 Januar 2025, 18:52:24
Hallo,

ich verzweifele an folgendem Sachverhalt:

defmod d_Balkon DOIF ([Balkon:humidity-humidity] <40)(set Du_Balkon off) DOELSE (set Du_Balkon on)funktioniert ohne Probleme.

Der (mE) gleiche Code mit anderen Geräten führt zur o.g. Fehlermeldung:
defmod d_TuyaBalkon DOIF ([TuyaBalkon:humidity] <35)(set Du_TuyaBalkon off) DOELSE (set Du_TuyaBalkon on)

Sieht jemand meinen Fehler? Das Reading "humidity" ist korrekt.

Hier das Listing:

[code]define tuya_smartlife_bfc79f5fc0a9ce7e03rpka fhempy tuya_smartlife tuya_smartlife_integration bfc79f5fc0a9ce7e03rpka
attr tuya_smartlife_bfc79f5fc0a9ce7e03rpka alias TuyaBalkon
attr tuya_smartlife_bfc79f5fc0a9ce7e03rpka group tuya_smartlife
attr tuya_smartlife_bfc79f5fc0a9ce7e03rpka room fhempy
attr tuya_smartlife_bfc79f5fc0a9ce7e03rpka stateFormat humidity
#   DEF        tuya_smartlife tuya_smartlife_integration bfc79f5fc0a9ce7e03rpka
#   DEVICEID   bfc79f5fc0a9ce7e03rpka
#   FHEMPYTYPE tuya_smartlife
#   FUUID      674dd01e-f33f-a79d-6bee-b2104c6760205e50
#   IODev      fhempy_local
#   NAME       tuya_smartlife_bfc79f5fc0a9ce7e03rpka
#   NR         842
#   PYTHONTYPE tuya_smartlife
#   STATE      0
#   TYPE       fhempy
#   eventCount 4
#   READINGS:
#     2025-01-03 17:58:11   battery_percentage 70
#     2025-01-03 17:58:11   battery_state   high
#     2025-01-03 17:58:11   humidity        0
#     2025-01-03 17:57:57   state           ready
#     2025-01-03 17:58:11   temp_current    7
#     2025-01-03 17:58:11   temp_unit_convert c
#   args:
#     tuya_smartlife_bfc79f5fc0a9ce7e03rpka
#     fhempy
#     tuya_smartlife
#     tuya_smartlife_integration
#     bfc79f5fc0a9ce7e03rpka
#   argsh:
#   hmccu:
#
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 0
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 2025-01-03 17:58:11 battery_percentage 70
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 2025-01-03 17:58:11 battery_state high
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 2025-01-03 17:58:11 humidity 0
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 2025-01-03 17:57:57 state ready
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 2025-01-03 17:58:11 temp_current 7
setstate tuya_smartlife_bfc79f5fc0a9ce7e03rpka 2025-01-03 17:58:11 temp_unit_convert c

[/code]

Vielen Dank,
Ingo
Titel: Aw: warning condition c01: Argument "" isn't numeric in numeric lt (<)
Beitrag von: Otto123 am 03 Januar 2025, 22:32:15
Hallo Ingo,

du darfst mW nicht den alias nehmen, sondern den richtigen Namen.
Was gibt denn dieser Ausdruck in der FHEM Kommandozeile zurück?
{ReadingsVal('TuyaBalkon','humidity','Fehler')}{ReadingsVal('tuya_smartlife_bfc79f5fc0a9ce7e03rpka','humidity','Fehler')}

Gruß Otto
Titel: Aw: warning condition c01: Argument "" isn't numeric in numeric lt (<)
Beitrag von: is2late am 04 Januar 2025, 08:23:07
Hallo Otto,

danke für Deine Mühe!

Der erste Code gibt "Fehler" zurück, der zweite "0". "0" ist tatsächlich der aktuelle Feuchtigkeitsgrad, der gesuchte Wert.
Du liegst also richtig; ich muss den Originalnamen nehmen.
Habs ausprobiert und es funktioniert.

Tausend Dank!

LG Ingo