Skip to content

Commit

Permalink
Add support for the language selector (#3214)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Oct 5, 2024
1 parent 6d42462 commit 83a5397
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion src/language-service/src/schemas/integrations/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export type Selector =
| FloorSelector
| IconSelector
| LabelSelector
| LanguageSelector
| LocationSelector
| MediaSelector
| NumberSelector
Expand Down Expand Up @@ -443,12 +444,38 @@ export interface LabelSelector {
label: {
/**
* Allows selecting multiple labels. If set to true, the resulting value of this selector will be a list instead of a single string value
*https://www.home-assistant.io/docs/blueprint/selectors/#label-selector
* https://www.home-assistant.io/docs/blueprint/selectors/#label-selector
*/
multiple?: boolean;
} | null;
}

export interface LanguageSelector {
/**
* The language selector allows a user to pick a language from a list of languages.
* https://www.home-assistant.io/docs/blueprint/selectors/#language-selector
*/
language: {
/**
* A list of languages to pick from, this should be RFC 5646 languages codes.
* https://www.home-assistant.io/docs/blueprint/selectors/#language-selector
*/
languages?: string[];

/**
* Should the name of the languages be shown in the language of the user, or in the language itself.
* https://www.home-assistant.io/docs/blueprint/selectors/#language-selector
*/
native_name?: boolean;

/**
* Should the options be sorted by name, if set to true, the order of the provided languages is kept.
* https://www.home-assistant.io/docs/blueprint/selectors/#language-selector
*/
no_sort?: boolean;
} | null;
}

export interface LocationSelector {
/**
* The icon selector shows an icon picker that allows the user to select an icon.
Expand Down

0 comments on commit 83a5397

Please sign in to comment.