Config.yaml options: Dropdown for partial backup selection

hey… i am currently developing my own addon for my backup needs… At the moment i take a look on how to make a comfortable way to choose which parts will be backed up in a partial backup.

I took a look at other addons… but i only found solutions where you have to manually write down the names of the addons in a textfield or similar… and you always have to know the names of the addons. for example in here:
https://github.com/ikifar2012/remote-backup-addon/

But i would like to have a dropdown of installed addons… kinda like in /hassio/backups which looks like this:

Any idea how to automaticaly generate/use this kind of multiple-choice drop-down of installed addons and maybe also folders?

i am also interested in solutions that provide similar functionality but look different… maybe like selectors

EDIT:
in the source-code of hassio i found this:
[%key:component::hassio::services::addon_start::fields::addon::name%]

but it does not work like this:

options:
  env_vars: []
  addons: [%key:component::hassio::services::addon_start::fields::addon::name%]
  folders: []
schema:
  env_vars: 
    - str
  addons:
    - str
  folders:
    - str

thx in advance
demlak

You would need to query the supervisor api to get the list of add-ons installed but the hassio integration (part of core HA) has helpers to do that from within HA.

You could then just use a selector in your config flow with the multi select option and use mapped list of name and id of addon to get a returned list you can use.

Sorry couldnt find examples and struggled to get the supervisor dev environment working (no time to sort that). NOTE: If you are developing in a dev container, there is a tutorial to also run the supervisor in a dev container and allow your HA dev instance to connect to it.

Thanx for your reply…

but i am totaly lost…
i know how to query the api’s from a bash script via bashio but what about config.yaml?

I also played with the selector syntax… but can’t get it to work =(

Sorry, thought you were creating an integration to configure your addon. Not sure you can do this with addon configs as they dont support selectors or dynamic lists in config.

The backup in HA is a frontend function which uses the hassio helpers to then command the supervisor to action.

You can however, create a custom component that uses the hassio functions to do this. That was what i laid out above.