Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Warning im Script?

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Warning im Script?

    This topic has been deleted. Only users with topic management privileges can see it.
    • hg6806
      hg6806 Most Active last edited by hg6806

      Hallo zusammen,

      habe hier immer ein Warning:

      21:13:33.999	warn	javascript.0 (1386) at Object.<anonymous> (script.js.common.Sonstiges.Pool-Solar_aktivieren:8:5)
      

      645e01cb-6997-4b91-9995-84e629677982-image.png

      on({id: "mqtt.0.Wemos9-Pool.Pool-Solar-Temp.Pool-Solar-Temp"/*/Wemos9-Pool/Pool-Solar-Temp/Pool-Solar-Temp*/, change: "ne"}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("mqtt.0.Wemos9-Pool.Pool-Solar-Temp.Pool-Solar-Temp").val > getState("mqtt.0.Wemos9-Pool.Pooltemperatur.Pooltemperatur").val + 1) {
          setState("mqtt.0.Wemos9-Pool.Poolpumpe2.GPIO.4"/*/Wemos9-Pool/Poolpumpe2/GPIO/4*/, 0);
        }
        if (getState("mqtt.0.Wemos9-Pool.Pool-Solar-Temp.Pool-Solar-Temp").val < getState("mqtt.0.Wemos9-Pool.Pooltemperatur.Pooltemperatur").val + 0.2) {
          setState("mqtt.0.Wemos9-Pool.Poolpumpe2.GPIO.4"/*/Wemos9-Pool/Poolpumpe2/GPIO/4*/, 1);
        }
      });
      
      

      Woher kommt das?

      F 1 Reply Last reply Reply Quote 0
      • F
        fastfoot @hg6806 last edited by

        @hg6806 Im LOG Tab findest du mehr Info dazu

        hg6806 1 Reply Last reply Reply Quote 0
        • hg6806
          hg6806 Most Active @fastfoot last edited by

          @fastfoot

          javascript.0
          2021-06-17 21:29:47.978	warn	at processImmediate (internal/timers.js:461:21)
          
          javascript.0
          2021-06-17 21:29:47.978	warn	at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:5555:41)
          
          javascript.0
          2021-06-17 21:29:47.978	warn	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:502:29)
          
          javascript.0
          2021-06-17 21:29:47.977	warn	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1075:38)
          
          javascript.0
          2021-06-17 21:29:47.977	warn	at Object.<anonymous> (script.js.common.Sonstiges.Pool-Solar_aktivieren:8:5)
          
          javascript.0
          2021-06-17 21:29:47.977	warn	at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1427:20)
          
          javascript.0
          2021-06-17 21:29:47.975	warn	You are assigning a number to the state "mqtt.0.Wemos9-Pool.Poolpumpe2.GPIO.4" which expects a string. Please fix your code to use a string or change the state type to number. This warning might become an error in future versions
          

          Das sind ala Warning zu Javascript

          F 1 Reply Last reply Reply Quote 0
          • F
            fastfoot @hg6806 last edited by fastfoot

            @hg6806 die Warnung besagt dass ein Text erwartet wird, keine Zahl. Probiere also Steuern mit "0" und "1" anstatt 0 und 1

            hg6806 1 Reply Last reply Reply Quote 0
            • hg6806
              hg6806 Most Active @fastfoot last edited by

              @fastfoot

              Danke sieht gut aus.

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

              Support us

              ioBroker
              Community Adapters
              Donate

              897
              Online

              31.8k
              Users

              80.0k
              Topics

              1.3m
              Posts

              2
              5
              207
              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