Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Vergangene Zeit seit lastchanged

    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

    Vergangene Zeit seit lastchanged

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

      Hi, ich steh aum Schlauch.
      Ich würde gerne bei einem Datenpunkt die vergangene Zeit seit der letzten Änderung auslesen, geht das?

      MFG
      CrunkFX

      AlCalzone 1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer @CrunkFX last edited by

        @CrunkFX so?

        const lc = getState("id").lc;
        const delta = Date.now() - lc;
        //    ^ Zeitdifferenz in ms
        
        CrunkFX 1 Reply Last reply Reply Quote 1
        • CrunkFX
          CrunkFX Forum Testing @AlCalzone last edited by CrunkFX

          @AlCalzone Danke doch so einfach? Aber woher kommt .lc? Ich versuche das nachzuvollziehen, nicht das wir uns falsch verstehen, der DP hat einen Textwert und keinen Timestamp. ich möchte auslesen wann zuletzt geändert wurde.

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

            @CrunkFX sagte:

            Aber woher kommt .lc?

            Ist im Zustand eines Datenpunktes enthalten.

            CrunkFX 1 Reply Last reply Reply Quote 1
            • CrunkFX
              CrunkFX Forum Testing @paul53 last edited by

              @paul53 So wird ein schuh draus, vielen Dank euch beiden.

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

              Support us

              ioBroker
              Community Adapters
              Donate

              882
              Online

              31.9k
              Users

              80.1k
              Topics

              1.3m
              Posts

              3
              5
              356
              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