How create a virtual selector switch

In my Domoticz installation I have a virtual selector switch for my ventilation automation as shown below.
As I’m slowly moving all things to HA and like to keep this I’m looking for a way to create a virtual selector switch in HA.

In Domoticz this is really easy but even with the help of google I can’t find a way to do this in HA. So hopefully someone can help me with this.

You can use the Input Select entity to hold the values you want to have as options.

For the dashboard there are many options, but one custom component you might want to check out is the following:

Thank you, I came a bit further. What I have is shown below but when I press a button I get the error message “required key not provided” for the it’s not clear what that means or how to solve it.

Based on what the error says, the key option is missing. In an input_select.select_option action, the data key should contain the key option and the value of the option that is being selected:

action: input_select.select_option
data:
  option: THE_OPTION_BEING_SELECTED
target:
  entity_id: input_select.example

That being said, error codes are not 100% accurate, so the above is a best guees based on the provided information. In the future, please follow the Community Guidelines by sharing the card configuration. It makes it much easier for us to diagnose the issues.