Sorting items when copying config.yaml #53
casse-boubou
started this conversation in
Ideas
Replies: 1 comment
-
Okay this is solved with release v1.2.3 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
When installing an addon from a Github repository on HomeAssistant, the configuration items are sorted alphabetically.
It would be nice if we could define the order of the items to easily configure the addon.
When adding the addon from the local directory of HomeAssistant, the order of the items is defined according to their order in ADDON/config.yaml -> schema.
But when we upload our addon to Github, the Github Action hassio-addons/repository-updater sorts the items in the confil.yaml in alphabetical order.
I'm not a developer and this is my first addon, but not the last, that I customize. This please me a lot!
I think item sorting occurs when the Github Action dumps the config.yaml file.
I found at repository-updater/repositoryupdater/addon.py between lines 281-339. Maybe even only line 337?
I saw on the internet that since the PyAML 5.1 version, the sort_keys=False option would make it possible not to sort the items of the file if it was added like
"yaml. dump(data, sort_keys=False)"
Do you think it would be possible to add this to the Github Action?
Thanks a lot! Congratulations for your complete work!
Beta Was this translation helpful? Give feedback.
All reactions