Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Datenpunkt von sek nach min direkt wandeln

    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

    Datenpunkt von sek nach min direkt wandeln

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

      Danke euch. Mit alias habe ich noch nichts gemacht.
      Werde mir das dann Morgen noch einmal ansehen.

      Scheint aber wirklich ein String zu sein, wenn in der Variable 10000 steht wird mir 10.000 angezeigt.
      Habe aber leine Plan wie ich die parseInt() Funktion in mein Konstrukt :

      {wert: homeconnect.0.BOSCH-WAYH2791-68A40E13A88D.programs.active.options.BSH_Common_Option_ProgramProgress;wert = wert/60}
      

      reinbekomme

      liv-in-sky OliverIO 3 Replies Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky @heinzie last edited by liv-in-sky

        @heinzie du kannst einen string so verwandeln

        wert=Number(wert)/60
        

        oder:

        wert=parseInt(wert)/60
        
        1 Reply Last reply Reply Quote 0
        • liv-in-sky
          liv-in-sky @heinzie last edited by

          @heinzie

          das mit einem alias ist nicht so schwer. du legst einen neuen datenpunkt unter alias.0 an. im raw bereich des neuen dp fügst du dann den alias teil hinzu.

          https://www.iobroker.net/#en/documentation/dev/aliases.md
          https://forum.iobroker.net/topic/25772/fragen-antworten-rund-um-die-neue-alias-funktion/7
          erstellen:
          anim-gif32.gif

          in nutzung:
          anim-gif34.gif

          H 1 Reply Last reply Reply Quote 0
          • OliverIO
            OliverIO @heinzie last edited by

            @heinzie sagte in Datenpunkt von sek nach min direkt wandeln:

            {wert: homeconnect.0.BOSCH-WAYH2791-68A40E13A88D.programs.active.options.BSH_Common_Option_ProgramProgress;wert = wert/60}

            Das müsste eigentlich dann so heissen.

            {wert: homeconnect.0.BOSCH-WAYH2791-68A40E13A88D.programs.active.options.BSH_Common_Option_ProgramProgress; parseInt(wert/60)}
            

            Das wert= Wäre hier falsch.

            liv-in-sky 1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @OliverIO last edited by

              @OliverIO muss nicht der wert geparst werden und dann durch 60 geteilt

              parseInt(wert)/60
              
              
              OliverIO H 2 Replies Last reply Reply Quote 0
              • OliverIO
                OliverIO @liv-in-sky last edited by

                @liv-in-sky
                Ja stimmt

                liv-in-sky 1 Reply Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky @OliverIO last edited by

                  @OliverIO aber das ganze funktioniert eh nicht, weil man im widget bei der object id das nicht eingeben kann - daher alias

                  OliverIO 1 Reply Last reply Reply Quote 0
                  • OliverIO
                    OliverIO @liv-in-sky last edited by OliverIO

                    @liv-in-sky
                    Müsste aber schon tun.

                    {objectID;operation1;operation2;...}
                    https://github.com/ioBroker/ioBroker.vis#bindings-of-objects

                    Ich würde hier ein einfaches Text oder Nummern Widget nehmen,
                    Oder html Widget

                    liv-in-sky 1 Reply Last reply Reply Quote 0
                    • liv-in-sky
                      liv-in-sky @OliverIO last edited by

                      @OliverIO im html widget geht es

                      in den progress widget bei mir nicht

                      OliverIO 1 Reply Last reply Reply Quote 0
                      • OliverIO
                        OliverIO @liv-in-sky last edited by

                        @liv-in-sky
                        Kann aktuell leider nix probieren.

                        1 Reply Last reply Reply Quote 0
                        • H
                          heinzie @liv-in-sky last edited by

                          @liv-in-sky Danke, werde ich mal ausprobieren

                          1 Reply Last reply Reply Quote 0
                          • H
                            heinzie @liv-in-sky last edited by

                            @liv-in-sky Geht leider nicht, auch nicht mit parseInt(wert)/60

                            liv-in-sky 3 Replies Last reply Reply Quote 0
                            • liv-in-sky
                              liv-in-sky @heinzie last edited by

                              @heinzie wir reden noch von dem progress widget

                              1 Reply Last reply Reply Quote 0
                              • liv-in-sky
                                liv-in-sky @heinzie last edited by

                                @heinzie falls interesse - anydesk session ?

                                1 Reply Last reply Reply Quote 0
                                • Scrounger
                                  Scrounger Developer @liv-in-sky last edited by

                                  @liv-in-sky sagte in Datenpunkt von sek nach min direkt wandeln:

                                  bei mir geht's, wenn ich den datenpunkt richtig nachgebaut habe

                                  {wert:controll-own.0.testObject;Math.floor(wert/60)}
                                  

                                  Ha hab ich mich doch richtig daran erinnert, das heut schon in nem anderen Thread von dir gelesen zu haben 😉

                                  @heinzie sagte in Datenpunkt von sek nach min direkt wandeln:

                                  Ich habe einen Datenpunkt der mir die Werte in Sekunden ausgibt. Diese möchte ich jetzt für eine Balkenanzeige direkt in Minuten umwandeln.

                                  Mal bissle Schleichwerbung, sowas geht sehr einfach mit dem linkeddevices adapter

                                  liv-in-sky 1 Reply Last reply Reply Quote 0
                                  • liv-in-sky
                                    liv-in-sky @Scrounger last edited by liv-in-sky

                                    @Scrounger heißt wohl, es geht nur über alias oder deinen adapter

                                    der linkdevice adapter erstellt ja letztlich auch nur ein alias

                                    danke und gruß

                                    ps: du darfst ganz offiziell und überall werbung für deine tollen adapter machen

                                    1 Reply Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @heinzie last edited by

                                      @heinzie

                                      geht nur über alias

                                      https://forum.iobroker.net/post/548882

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

                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      824
                                      Online

                                      31.9k
                                      Users

                                      80.2k
                                      Topics

                                      1.3m
                                      Posts

                                      javascript
                                      4
                                      30
                                      948
                                      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