Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Timeout mit Objekt verbinden

    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

    Timeout mit Objekt verbinden

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

      wie kann man am elegantesten einem Objekt einen Timer zuordnen?
      Schon einmal vielen Dank für die Antworten.

      let timeoutVar = null
      let timerObj = false
      const idsWerDA = $('state(functions=werdaog)')
      
      idsWerDA.on(function(obj){
             timerObj = false
             if (läuft Timer für dieses Objekt?) timerObj = true
             if(obj.state.val < 10 && !timerObj){
                   timeoutVar = setTimeout(function(){
                                    // Aktion wenn Zeit für dieses Objekt abgelaufen
                                 }, 50000);
             }
      }
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      997
      Online

      31.8k
      Users

      80.0k
      Topics

      1.3m
      Posts

      javascript
      1
      1
      184
      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