Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Mehrere Datenpunkte abfragen Script HTML Widget

    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

    Mehrere Datenpunkte abfragen Script HTML Widget

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

      Hallo zusammen...

      Aktuell rufe ich in einem Script einen Datenpunkt ab...

      self=this;
      self.servConn.getStates(dataPoint, (error, states) => {  console.log(states);dataDayRain=states[dataPoint].val ;
      

      Das funktioniert perfekt.
      Allerdings benötige ich für eine Berechnung noch einen 2. Datenpunkt...

      self=this;
      self.servConn.getStates(dataPoint, (error, states) => {  console.log(states);dataDayRain=states[dataPoint].val ;
      self.servConn.getStates(datapointColors, (error, states) => {  console.log(states);colors=states[datapointColors].val ;
      

      Das rendern des HTML widget scheitert und im Browser bekomme ich folgenden angezeigt...

      
      instrument.ts:129 Trying to get states again, because emitted getStates still pending
      instrument.ts:129 Error: can't render tplHtml w00261
      

      Was mache ich falsch?

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

      Support us

      ioBroker
      Community Adapters
      Donate

      805
      Online

      31.8k
      Users

      80.0k
      Topics

      1.3m
      Posts

      1
      1
      100
      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