Pipelines: Add voice selector, implement supported languages (#16261)

This commit is contained in:
Bram Kragten
2023-04-20 22:53:05 +02:00
committed by GitHub
parent 6e91ac2a34
commit 09f4e19d4c
13 changed files with 285 additions and 21 deletions

View File

@@ -3,8 +3,8 @@ import {
CSSResultGroup,
html,
LitElement,
nothing,
PropertyValues,
TemplateResult,
} from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
@@ -74,7 +74,7 @@ export class HaLanguagePicker extends LitElement {
);
}
protected render(): TemplateResult {
protected render() {
const value = this.value;
const languageOptions = this._getLanguagesOptions(
@@ -83,6 +83,10 @@ export class HaLanguagePicker extends LitElement {
this.nativeName
);
if (languageOptions.length === 0) {
return nothing;
}
return html`
<ha-select
.label=${this.label}