Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. English
  3. Error/Bug
  4. [solved] Change enums object order

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.4k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.0k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.5k

[solved] Change enums object order

Geplant Angeheftet Gesperrt Verschoben Error/Bug
11 Beiträge 4 Kommentatoren 2.3k Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • M MartiMan

    Hi all,

    I'm using the Enums entries as an array to update them with my PLC with the S7 adapter so their order is very important.

    d38f657f-8769-4c2f-9205-9fb325236f86-image.png

    There are sometimes more than 20 objects in there, now I forgot one in the beginning but it's impossible to move or rearrange them although clearly a little hand appears when you hover over the "state" icon.

    Is there a way to rearrange them using a file editor in a json file or so?
    Was looking in the ioBroker folders but can't find anything...

    Thanks in advance!

    HomoranH Nicht stören
    HomoranH Nicht stören
    Homoran
    Global Moderator Administrators
    schrieb am zuletzt editiert von
    #2

    @martiman sagte in Change enums object order:

    Is there a way to rearrange them

    I don't think so. I guess they are sorted alphabetically.

    kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

    M 1 Antwort Letzte Antwort
    0
    • HomoranH Homoran

      @martiman sagte in Change enums object order:

      Is there a way to rearrange them

      I don't think so. I guess they are sorted alphabetically.

      M Offline
      M Offline
      MartiMan
      schrieb am zuletzt editiert von
      #3

      @homoran No not alphabetically, they are put there in order as you place them.
      If you miss one in the beginning you have to delete all the ones after and start all over :rolling_on_the_floor_laughing:

      HomoranH 1 Antwort Letzte Antwort
      0
      • M MartiMan

        @homoran No not alphabetically, they are put there in order as you place them.
        If you miss one in the beginning you have to delete all the ones after and start all over :rolling_on_the_floor_laughing:

        HomoranH Nicht stören
        HomoranH Nicht stören
        Homoran
        Global Moderator Administrators
        schrieb am zuletzt editiert von
        #4

        @martiman sagte in Change enums object order:

        they are put there in order as you place them.

        so I'm very sorry, that I cannot help you.
        I just tried to play with some entries, but no success.

        Maybe another user who works with enums cann help.

        kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

        der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

        M 1 Antwort Letzte Antwort
        0
        • Jey CeeJ Online
          Jey CeeJ Online
          Jey Cee
          Developer
          schrieb am zuletzt editiert von
          #5

          It is possible to sort it, as the enums are objects.
          Activate the expert mode, go to objects tab, enum and look for the object of enum group you want to edit.
          Then open the object raw by clicking on the end of the line. There you will find the members array, which is what you are looking for.

          You can automate the sorting with a javascript, while in the settings of the javascript adapter the setObject is checked.

          Persönlicher Support
          Spenden -> paypal.me/J3YC33

          HomoranH M paul53P 3 Antworten Letzte Antwort
          1
          • HomoranH Homoran

            @martiman sagte in Change enums object order:

            they are put there in order as you place them.

            so I'm very sorry, that I cannot help you.
            I just tried to play with some entries, but no success.

            Maybe another user who works with enums cann help.

            M Offline
            M Offline
            MartiMan
            schrieb am zuletzt editiert von
            #6

            @homoran Thanks for your effort, anyway I'm doing it by hand now checking 3 times each time adding :laughing:
            But because of the little hand it looks like the possibility in arranging them was meant to be the plan but simply not implemented yet.
            Therefore my message.

            1 Antwort Letzte Antwort
            0
            • Jey CeeJ Jey Cee

              It is possible to sort it, as the enums are objects.
              Activate the expert mode, go to objects tab, enum and look for the object of enum group you want to edit.
              Then open the object raw by clicking on the end of the line. There you will find the members array, which is what you are looking for.

              You can automate the sorting with a javascript, while in the settings of the javascript adapter the setObject is checked.

              HomoranH Nicht stören
              HomoranH Nicht stören
              Homoran
              Global Moderator Administrators
              schrieb am zuletzt editiert von
              #7

              @jey-cee that was what I remembered, but I didn't find the listing (in enums :face_palm: )

              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

              M 1 Antwort Letzte Antwort
              0
              • Jey CeeJ Jey Cee

                It is possible to sort it, as the enums are objects.
                Activate the expert mode, go to objects tab, enum and look for the object of enum group you want to edit.
                Then open the object raw by clicking on the end of the line. There you will find the members array, which is what you are looking for.

                You can automate the sorting with a javascript, while in the settings of the javascript adapter the setObject is checked.

                M Offline
                M Offline
                MartiMan
                schrieb am zuletzt editiert von
                #8

                @jey-cee Awesome!!! Thanks, didn't think of expert mode was necessary to show enums in objects :wink:
                :+1:

                1 Antwort Letzte Antwort
                0
                • Jey CeeJ Jey Cee

                  It is possible to sort it, as the enums are objects.
                  Activate the expert mode, go to objects tab, enum and look for the object of enum group you want to edit.
                  Then open the object raw by clicking on the end of the line. There you will find the members array, which is what you are looking for.

                  You can automate the sorting with a javascript, while in the settings of the javascript adapter the setObject is checked.

                  paul53P Offline
                  paul53P Offline
                  paul53
                  schrieb am zuletzt editiert von
                  #9

                  @jey-cee sagte: You can automate the sorting with a javascript, while in the settings of the javascript adapter the setObject is checked.

                  const idBat = 'enum.functions.HeatingUp.BatStat';
                  const obj = getObject(idBat);
                  obj.common.members.sort();
                  setObject(idBat, obj);
                  

                  Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                  Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                  1 Antwort Letzte Antwort
                  0
                  • HomoranH Homoran

                    @jey-cee that was what I remembered, but I didn't find the listing (in enums :face_palm: )

                    M Offline
                    M Offline
                    MartiMan
                    schrieb am zuletzt editiert von
                    #10

                    @homoran For me this issue can be closed, can I or does a moderator have to de this?

                    HomoranH 1 Antwort Letzte Antwort
                    0
                    • M MartiMan

                      @homoran For me this issue can be closed, can I or does a moderator have to de this?

                      HomoranH Nicht stören
                      HomoranH Nicht stören
                      Homoran
                      Global Moderator Administrators
                      schrieb am zuletzt editiert von
                      #11

                      @martiman sagte in Change enums object order:

                      can I

                      edit the first post and set [solved] at the start of the title

                      kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                      Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                      der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                      1 Antwort Letzte Antwort
                      1
                      Antworten
                      • In einem neuen Thema antworten
                      Anmelden zum Antworten
                      • Älteste zuerst
                      • Neuste zuerst
                      • Meiste Stimmen


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      491

                      Online

                      32.4k

                      Benutzer

                      81.4k

                      Themen

                      1.3m

                      Beiträge
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Anmelden

                      • Du hast noch kein Konto? Registrieren

                      • Anmelden oder registrieren, um zu suchen
                      • Erster Beitrag
                        Letzter Beitrag
                      0
                      • Home
                      • Aktuell
                      • Tags
                      • Ungelesen 0
                      • Kategorien
                      • Unreplied
                      • Beliebt
                      • GitHub
                      • Docu
                      • Hilfe