Skip to content
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
Logo
  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.1k

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

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

[solved] Change enums object order

Scheduled Pinned Locked Moved Error/Bug
11 Posts 4 Posters 2.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MartiMan
    wrote on last edited by MartiMan
    #1

    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 1 Reply Last reply
    0
    • 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 Do not disturb
      HomoranH Do not disturb
      Homoran
      Global Moderator Administrators
      wrote on last edited by
      #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 Reply Last reply
      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
        wrote on last edited by
        #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 🤣

        HomoranH 1 Reply Last reply
        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 🤣

          HomoranH Do not disturb
          HomoranH Do not disturb
          Homoran
          Global Moderator Administrators
          wrote on last edited by
          #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 Reply Last reply
          0
          • Jey CeeJ Online
            Jey CeeJ Online
            Jey Cee
            Developer
            wrote on last edited by
            #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 Replies Last reply
            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
              wrote on last edited by
              #6

              @homoran Thanks for your effort, anyway I'm doing it by hand now checking 3 times each time adding 😆
              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 Reply Last reply
              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 Do not disturb
                HomoranH Do not disturb
                Homoran
                Global Moderator Administrators
                wrote on last edited by
                #7

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

                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 Reply Last reply
                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
                  wrote on last edited by
                  #8

                  @jey-cee Awesome!!! Thanks, didn't think of expert mode was necessary to show enums in objects 😉
                  👍

                  1 Reply Last reply
                  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
                    wrote on last edited by
                    #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 Reply Last reply
                    0
                    • HomoranH Homoran

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

                      M Offline
                      M Offline
                      MartiMan
                      wrote on last edited by
                      #10

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

                      HomoranH 1 Reply Last reply
                      0
                      • M MartiMan

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

                        HomoranH Do not disturb
                        HomoranH Do not disturb
                        Homoran
                        Global Moderator Administrators
                        wrote on last edited by
                        #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 Reply Last reply
                        1
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        369

                        Online

                        32.4k

                        Users

                        81.4k

                        Topics

                        1.3m

                        Posts
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                        ioBroker Community 2014-2025
                        logo
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Recent
                        • Tags
                        • Unread 0
                        • Categories
                        • Unreplied
                        • Popular
                        • GitHub
                        • Docu
                        • Hilfe