andrewshilliday / garage-door-controller

Software to monitor and control garage doors via a raspberry pi
MIT License
327 stars 132 forks source link

Door List Order #113

Open charredchar opened 4 years ago

charredchar commented 4 years ago

I added four doors to the config but they are not listed in order of the config or in order of the name. I want these to be listed in a specific order, how would I go about this?

andrewshilliday commented 4 years ago

I hadn’t considered that. It would require a code change to preserve the order from the config file. Shouldn’t be too difficult if anyone wants to take a stab at it :). Otherwise I’ll try to make the change when I get a chance.

bkjems commented 4 years ago

Change self.doors = [Door(n, c) for (n, c) in config['doors'].items()] to self.doors = [Door(n, c) for (n, c) in sorted(config['doors'].items())]

To sort by doors in the config file

andrewshilliday commented 4 years ago

@bkjems would you care yo make a pull request for the change?

bkjems commented 4 years ago

@andrewshilliday It looks like its committed. https://github.com/andrewshilliday/garage-door-controller/commit/28557699b4ccf807b60a7e1b66558e9ce3c98233#diff-7a315c65deca2c033ce485bfa9de4f4a

nadineross412 commented 1 year ago

Hi there! In order to list the doors in a specific order, you may need to modify the code or configuration file of the garage door controller to reflect the order you want. You can try looking for a section in the code that lists the doors and try rearranging the order there. Alternatively, you can reach out to the developer or support team for the garage door controller and see if they have any suggestions or solutions. Hope this helps!