Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. function "round" does not match function signature

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    function "round" does not match function signature

    This topic has been deleted. Only users with topic management privileges can see it.
    • _
      _R_A_L_F_ last edited by

      Hallo,
      ich habe folgende Fehlermeldung in den Logs:
      ebbf1cdf-06de-4773-881c-c91f230103d1-image.png

      Die Meldung kommt auch recht sporadisch.
      Ich mache im Endeffekt eine SQL Abfrage und bekommen einen Number Wert zurück und da dieser Wert mehrere Nachkommastellen hat, runde ich den Wert auf 2 Nachkommastellen ab.
      c1d03da4-140e-43d2-9ac2-ea16e612dcd7-image.png

      Für mich ne absolute Standardfunktion mit JSONata. Aber was hat es mit der Meldung "round does not match function signature" auf sich hat kann ich mir nicht erklären?

      Weiß jemand einen Rat?
      Vielen Dank

      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @_R_A_L_F_ last edited by mickym

        @_r_a_l_f_

        e7de53df-d31c-4af4-9162-98ef21a8f0c8-image.png

        Die Fehlermeldung kommt, wenn die payload keine Zahl ist:

        [
           {
               "id": "046e01f2061bffeb",
               "type": "inject",
               "z": "289f539dcc33814e",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "12.1169485616",
               "payloadType": "num",
               "x": 740,
               "y": 4760,
               "wires": [
                   [
                       "d225c42e05970095"
                   ]
               ]
           },
           {
               "id": "9d85eb667c7bc207",
               "type": "debug",
               "z": "289f539dcc33814e",
               "name": "round",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 1150,
               "y": 4800,
               "wires": []
           },
           {
               "id": "d225c42e05970095",
               "type": "change",
               "z": "289f539dcc33814e",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "$round(payload, 2)",
                       "tot": "jsonata"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 970,
               "y": 4800,
               "wires": [
                   [
                       "9d85eb667c7bc207"
                   ]
               ]
           },
           {
               "id": "85ef483ea7fa2b8a",
               "type": "inject",
               "z": "289f539dcc33814e",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "12,1169485616",
               "payloadType": "str",
               "x": 740,
               "y": 4840,
               "wires": [
                   [
                       "d225c42e05970095"
                   ]
               ]
           },
           {
               "id": "bc61a8bbc2e5afbc",
               "type": "inject",
               "z": "289f539dcc33814e",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "12.1169485616",
               "payloadType": "str",
               "x": 740,
               "y": 4800,
               "wires": [
                   [
                       "d225c42e05970095"
                   ]
               ]
           },
           {
               "id": "443cf875b2e33326",
               "type": "inject",
               "z": "289f539dcc33814e",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "",
               "payload": "",
               "payloadType": "str",
               "x": 770,
               "y": 4880,
               "wires": [
                   [
                       "d225c42e05970095"
                   ]
               ]
           }
        ]
        

        Wenn Du das vermeiden willst hängst Du einen switch als Filter davor, der nur Zahlen durchlässt.

        _ 1 Reply Last reply Reply Quote 0
        • _
          _R_A_L_F_ @mickym last edited by

          @mickym ok, Danke für den Hinweis 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Support us

          ioBroker
          Community Adapters
          Donate

          1.0k
          Online

          31.7k
          Users

          79.7k
          Topics

          1.3m
          Posts

          2
          3
          123
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
          The ioBroker Community 2014-2023
          logo