Allow changing the display order of devices in a box

Let me explain:

When creating a box to display the devices of a room, we add devices one after another.
But when saving, the display changes the order.

Desired when creating the box:
![Capture 5|395x387](upload://91kk4l93mFzygSVNvVx9P9lVrQ

I don’t have any more votes
 Yet I support it 100

For your information, another feature request created by @guim31 already existed:

I closed it, since this one has more votes.
@_Will_71, you can vote here and free up your vote on the other one if you wish.

I did remove my vote from the other thread, but I can’t vote here.

Weird !! Indeed your vote did go through on the other thread
Bug 
? Maybe try logging out and back in 
 what does it say? « Limit Â» ?

Yes, it’s marked « limit Â»â€Š

Anyway, I’ll check later tonight and I’ll take the opportunity to sort through my votes.

I therefore freed up a vote from a closed feature request.

Thanks, me too then

Hi everyone :slight_smile:

I’m working on this feature today, and I’m grouping it with the request to be able to rename devices within this widget.

The idea would be to end up with something like this:

Short progress video :

I’m happy with how it works — although it breaks quite a few things in the front-end, so there’s work to adapt everything :stuck_out_tongue:

Ah, and of course, the order is preserved and editable :

The PR:

I’m working on a Docker build to provide a test image :slight_smile:

https://github.com/GladysAssistant/Gladys/actions/runs/5646340497

A test Docker image is available for those who want to try:

gladysassistant/gladys:device-widget-rename-reorder

I don’t necessarily recommend testing in production because there are database changes and rolling back to the production image is not possible with this PR ^^

I’ll run tests on my side as well

Thanks @pierre-gilles :clap:
If I have time I’ll try the Docker image tonight.

I just tried quickly on a new installation with a new database and I have an issue.
I can’t add devices to the Devices widget

I’ve checked the logs but there’s nothing unusual.

Thanks for testing so quickly, I think I know what it is, I’ll fix that and get back to you! :slight_smile:

@_Will_71 It’s fixed on the branch, a new Docker build on the same tag is being built and will be ready in about 1 hour :slight_smile:

https://github.com/GladysAssistant/Gladys/actions/runs/5665970250

Ok I’ll try as soon as possible

It’s good, it works this time! We can modify the order and rename the texts. Perfect! Nice work.

Hello @pierre-gilles,

does this dev concern all the movements within the same widget?
let me explain: I created a Node-RED flow to retrieve the data from my weather station (long story
),
this Node-RED flow feeds 2 MQTT devices assigned to the room « terrain Â».
then on the dashboard I create a device widget for the room « terrain Â» for which I select the following features in the order I want them to appear:
date,time,outdoor temperature,rain,wind speed,wind direction,wind orientation,local pressure,humidity,UV index and finally solar radiation.
and I save.
and in the end, on the dashboard I get a rendering that does not take into account the order in which I selected the features (see screenshot below!)
do you have any idea? does this relate to the subject you’re dealing with here? does it look like it?

Yes, you can put them in whatever order you want with this development, but you’ll have to