Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Wrong type string - Type is Object?

    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

    Wrong type string - Type is Object?

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

      Hallo!

      Ich habe einen neuen State angelegt mit:
      ` > createState('Data.CallsFromFB', {

      name: 'CallsFromFB',

      read: true,

      write: true,

      type: "object",

      role: "table"

      }); `

      Dann schreibe ich dort einen JSON String rein. Aber es kommt:
      ` > on({id: "fritzbox.0.history.allTableJSON"/history of calls as JSON/, change:'ne'}, function (obj) {

      jsonCalls=getState("fritzbox.0.history.allTableJSON"/history of calls as JSON/).val;

      newHtmlMissed="";

      newHtmlIncomming="";

      newHtmlOutgoing="";

      jsonCalls = jsonCalls.replace(new RegExp('** ->X**', 'g'),newHtmlMissed);

      jsonCalls = jsonCalls.replace(new RegExp('** ->>**', 'g'),newHtmlIncomming);

      jsonCalls = jsonCalls.replace(new RegExp('**<<- **', 'g'),newHtmlOutgoing);

      setState("Data.CallsFromFB",jsonCalls);

      }) `

      "Wrong type of javascript.0.Data.CallsFromFB: "string". Please fix, while deprecated and will not work in next versions."

      Was könnte ich falsch haben?

      1 Reply Last reply Reply Quote 0
      • paul53
        paul53 last edited by

           type: "object",
        

        ist falsch. Ändere im Datenpunkt common.type von "object" in "string" (im Reiter "Objekte").

        1 Reply Last reply Reply Quote 0
        • B
          baeckerman83 last edited by

          Meinst du Zeichenkette? Weil String gibt es da leider nicht. Objekt gibt es aber und das war auch ausgewählt.

          1 Reply Last reply Reply Quote 0
          • paul53
            paul53 last edited by

            @baeckerman83:

            Meinst du Zeichenkette? `
            Ja.

            1 Reply Last reply Reply Quote 0
            • B
              baeckerman83 last edited by

              Okay dann stelle ich das ein.

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

              Support us

              ioBroker
              Community Adapters
              Donate

              569
              Online

              31.7k
              Users

              79.8k
              Topics

              1.3m
              Posts

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