-
+ >
${this.assistConfiguration &&
this.assistConfiguration.available_wake_words.length > 1
diff --git a/src/onboarding/onboarding-location.ts b/src/onboarding/onboarding-location.ts
index 32ee949491..ce9e7b146b 100644
--- a/src/onboarding/onboarding-location.ts
+++ b/src/onboarding/onboarding-location.ts
@@ -16,8 +16,8 @@ import "../components/ha-list";
import "../components/ha-list-item";
import "../components/ha-radio";
import "../components/ha-spinner";
-import "../components/ha-textfield";
-import type { HaTextField } from "../components/ha-textfield";
+import "../components/input/ha-input";
+import type { HaInput } from "../components/input/ha-input";
import "../components/map/ha-locations-editor";
import type {
HaLocationsEditor,
@@ -103,22 +103,20 @@ class OnboardingLocation extends LitElement {
-
-
+
${this._working
- ? html` `
+ ? html``
: html`
`}
-
+
${this._places !== undefined
? html`
@@ -204,10 +202,7 @@ class OnboardingLocation extends LitElement {
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);
- setTimeout(
- () => this.renderRoot.querySelector("ha-textfield")!.focus(),
- 100
- );
+ setTimeout(() => this.renderRoot.querySelector("ha-input")!.focus(), 100);
this.addEventListener("keyup", (ev) => {
if (ev.key === "Enter") {
this._save(ev);
@@ -299,11 +294,11 @@ class OnboardingLocation extends LitElement {
private async _addressSearch(ev: KeyboardEvent) {
ev.stopPropagation();
- this._search = (ev.currentTarget as HaTextField).value.length > 0;
+ this._search = ((ev.currentTarget as HaInput).value ?? "").length > 0;
if (ev.key !== "Enter") {
return;
}
- this._searchAddress((ev.currentTarget as HaTextField).value);
+ this._searchAddress((ev.currentTarget as HaInput).value ?? "");
}
private async _searchAddress(address: string) {
@@ -477,28 +472,6 @@ class OnboardingLocation extends LitElement {
margin-top: 32px;
margin-bottom: 32px;
}
- ha-textfield {
- display: block;
- }
- ha-textfield > ha-icon-button {
- position: absolute;
- top: 10px;
- right: 10px;
- inset-inline-end: 10px;
- inset-inline-start: initial;
- --ha-icon-button-size: 36px;
- --mdc-icon-size: 20px;
- color: var(--secondary-text-color);
- inset-inline-start: initial;
- inset-inline-end: 10px;
- direction: var(--direction);
- }
- ha-textfield > ha-spinner {
- position: relative;
- left: 12px;
- inset-inline-start: 12px;
- inset-inline-end: initial;
- }
ha-locations-editor {
display: block;
height: 300px;
@@ -519,7 +492,7 @@ class OnboardingLocation extends LitElement {
height: 72px;
}
.attribution {
- /* textfield helper style */
+ /* input helper style */
margin: 0;
padding: 4px 16px 12px 16px;
color: var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6));
diff --git a/src/panels/calendar/dialog-calendar-event-editor.ts b/src/panels/calendar/dialog-calendar-event-editor.ts
index ac9927e38f..9932f6a71f 100644
--- a/src/panels/calendar/dialog-calendar-event-editor.ts
+++ b/src/panels/calendar/dialog-calendar-event-editor.ts
@@ -10,6 +10,11 @@ import type { CSSResultGroup } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
+import {
+ formatDate,
+ formatTime,
+ parseDate,
+} from "../../common/datetime/calc_date";
import { resolveTimeZone } from "../../common/datetime/resolve-time-zone";
import { fireEvent } from "../../common/dom/fire_event";
import { computeStateDomain } from "../../common/entity/compute_state_domain";
@@ -19,13 +24,13 @@ import "../../components/entity/ha-entity-picker";
import "../../components/ha-alert";
import "../../components/ha-button";
import "../../components/ha-date-input";
+import "../../components/ha-dialog";
import "../../components/ha-dialog-footer";
import "../../components/ha-formfield";
import "../../components/ha-switch";
import "../../components/ha-textarea";
-import "../../components/ha-textfield";
import "../../components/ha-time-input";
-import "../../components/ha-dialog";
+import "../../components/input/ha-input";
import type { CalendarEventMutableParams } from "../../data/calendar";
import {
CalendarEntityFeature,
@@ -40,11 +45,6 @@ import "../lovelace/components/hui-generic-entity-row";
import "./ha-recurrence-rule-editor";
import { showConfirmEventDialog } from "./show-confirm-event-dialog-box";
import type { CalendarEventEditDialogParams } from "./show-dialog-calendar-event-editor";
-import {
- formatDate,
- formatTime,
- parseDate,
-} from "../../common/datetime/calc_date";
const CALENDAR_DOMAINS = ["calendar"];
@@ -170,7 +170,7 @@ class DialogCalendarEventEditor extends LitElement {
>`
: ""}
-
-
+
+ >
+ >
+
+ ${this.hass.localize(
+ `ui.components.calendar.event.repeat.interval.${this
+ ._freq!}` as LocalizeKeys
+ )}
+
+
`;
}
@@ -267,7 +270,7 @@ export class RecurrenceRuleEditor extends LitElement {
${this._end === "after"
? html`
-
+ >
+
+ ${this.hass.localize(
+ "ui.components.calendar.event.repeat.end_after.ocurrences"
+ )}
+
+
`
: nothing}
${this._end === "on"
@@ -452,15 +458,16 @@ export class RecurrenceRuleEditor extends LitElement {
}
static styles = css`
- ha-textfield,
+ ha-input,
ha-select {
display: block;
margin-bottom: 16px;
+ --ha-input-padding-bottom: 0;
}
.weekdays {
margin-bottom: 16px;
}
- ha-textfield:last-child,
+ ha-input:last-child,
ha-select:last-child,
.weekdays:last-child {
margin-bottom: 0;
diff --git a/src/panels/config/areas/dialog-area-registry-detail.ts b/src/panels/config/areas/dialog-area-registry-detail.ts
index 5d5d46c2de..6f3443b938 100644
--- a/src/panels/config/areas/dialog-area-registry-detail.ts
+++ b/src/panels/config/areas/dialog-area-registry-detail.ts
@@ -8,6 +8,7 @@ import type { HaEntityPicker } from "../../../components/entity/ha-entity-picker
import "../../../components/ha-alert";
import "../../../components/ha-aliases-editor";
import "../../../components/ha-button";
+import "../../../components/ha-dialog";
import "../../../components/ha-dialog-footer";
import "../../../components/ha-expansion-panel";
import "../../../components/ha-floor-picker";
@@ -18,8 +19,8 @@ import type { HaPictureUpload } from "../../../components/ha-picture-upload";
import "../../../components/ha-settings-row";
import "../../../components/ha-suggest-with-ai-button";
import type { SuggestWithAIGenerateTask } from "../../../components/ha-suggest-with-ai-button";
-import "../../../components/ha-textfield";
-import "../../../components/ha-dialog";
+import "../../../components/input/ha-input";
+import type { HaInput } from "../../../components/input/ha-input";
import type { GenDataTaskResult } from "../../../data/ai_task";
import type {
AreaRegistryEntry,
@@ -30,9 +31,9 @@ import {
SENSOR_DEVICE_CLASS_HUMIDITY,
SENSOR_DEVICE_CLASS_TEMPERATURE,
} from "../../../data/sensor";
-import type { HassDialog } from "../../../dialogs/make-dialog-manager";
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
import type { CropOptions } from "../../../dialogs/image-cropper-dialog/show-image-cropper-dialog";
+import type { HassDialog } from "../../../dialogs/make-dialog-manager";
import { haStyleDialog } from "../../../resources/styles";
import type { HomeAssistant, ValueChangedEvent } from "../../../types";
import {
@@ -144,7 +145,7 @@ class DialogAreaDetail
`
: nothing}
-
+ >
+ auto-validate
+ >
-
+ >
+ >
-
+ >
`
: nothing}
`;
@@ -143,9 +145,12 @@ export class HaServiceAction extends LitElement implements ActionElement {
fireEvent(this, "value-changed", { value });
}
- private _responseVariableChanged(ev) {
- const value = { ...this.action, response_variable: ev.target.value };
- if (!ev.target.value) {
+ private _responseVariableChanged(ev: InputEvent) {
+ const value = {
+ ...this.action,
+ response_variable: (ev.target as HaInput).value,
+ };
+ if (!(ev.target as HaInput).value) {
delete value.response_variable;
}
fireEvent(this, "value-changed", { value });
diff --git a/src/panels/config/automation/action/types/ha-automation-action-stop.ts b/src/panels/config/automation/action/types/ha-automation-action-stop.ts
index 8e4af79235..5c346a3ce7 100644
--- a/src/panels/config/automation/action/types/ha-automation-action-stop.ts
+++ b/src/panels/config/automation/action/types/ha-automation-action-stop.ts
@@ -1,21 +1,25 @@
+import { consume, type ContextType } from "@lit/context";
import { css, html, LitElement } from "lit";
-import { customElement, property } from "lit/decorators";
+import { customElement, property, state } from "lit/decorators";
import { fireEvent } from "../../../../../common/dom/fire_event";
-import "../../../../../components/ha-textfield";
import "../../../../../components/ha-formfield";
import "../../../../../components/ha-switch";
+import "../../../../../components/input/ha-input";
+import type { HaInput } from "../../../../../components/input/ha-input";
+import { localizeContext } from "../../../../../data/context";
import type { StopAction } from "../../../../../data/script";
-import type { HomeAssistant } from "../../../../../types";
import type { ActionElement } from "../ha-automation-action-row";
@customElement("ha-automation-action-stop")
export class HaStopAction extends LitElement implements ActionElement {
- @property({ attribute: false }) public hass!: HomeAssistant;
-
@property({ attribute: false }) public action!: StopAction;
@property({ type: Boolean }) public disabled = false;
+ @state()
+ @consume({ context: localizeContext, subscribe: true })
+ private localize!: ContextType;
+
public static get defaultConfig(): StopAction {
return { stop: "" };
}
@@ -24,25 +28,25 @@ export class HaStopAction extends LitElement implements ActionElement {
const { error, stop, response_variable } = this.action;
return html`
-
-
+
+ >
@@ -55,17 +59,17 @@ export class HaStopAction extends LitElement implements ActionElement {
`;
}
- private _stopChanged(ev: Event) {
+ private _stopChanged(ev: InputEvent) {
ev.stopPropagation();
fireEvent(this, "value-changed", {
- value: { ...this.action, stop: (ev.target as any).value },
+ value: { ...this.action, stop: (ev.target as HaInput).value },
});
}
- private _responseChanged(ev: Event) {
+ private _responseChanged(ev: InputEvent) {
ev.stopPropagation();
const newAction = { ...this.action };
- const newValue = (ev.target as any).value;
+ const newValue = (ev.target as HaInput).value;
if (newValue) {
newAction.response_variable = newValue;
} else {
@@ -84,9 +88,8 @@ export class HaStopAction extends LitElement implements ActionElement {
}
static styles = css`
- ha-textfield {
- display: block;
- margin-bottom: 24px;
+ ha-input {
+ margin-bottom: var(--ha-space-6);
}
`;
}
diff --git a/src/panels/config/automation/automation-mode-dialog/dialog-automation-mode.ts b/src/panels/config/automation/automation-mode-dialog/dialog-automation-mode.ts
index 2ea068f637..64f861035f 100644
--- a/src/panels/config/automation/automation-mode-dialog/dialog-automation-mode.ts
+++ b/src/panels/config/automation/automation-mode-dialog/dialog-automation-mode.ts
@@ -10,8 +10,9 @@ import "../../../../components/ha-icon-button";
import "../../../../components/ha-md-list";
import "../../../../components/ha-md-list-item";
import "../../../../components/ha-radio";
-import "../../../../components/ha-textfield";
+import "../../../../components/input/ha-input";
+import type { HaInput } from "../../../../components/input/ha-input";
import {
AUTOMATION_DEFAULT_MAX,
AUTOMATION_DEFAULT_MODE,
@@ -68,7 +69,6 @@ class DialogAutomationMode extends LitElement implements HassDialog {
return html`
-
-
+
`
: nothing}
@@ -176,9 +175,9 @@ class DialogAutomationMode extends LitElement implements HassDialog {
}
}
- private _valueChanged(ev: CustomEvent) {
+ private _valueChanged(ev: InputEvent) {
ev.stopPropagation();
- const target = ev.target as any;
+ const target = ev.target as HaInput;
if (target.name === "max") {
this._newMax = Number(target.value);
}
@@ -201,9 +200,6 @@ class DialogAutomationMode extends LitElement implements HassDialog {
haStyle,
haStyleDialog,
css`
- ha-textfield {
- display: block;
- }
ha-dialog {
--dialog-content-padding: 0;
}
diff --git a/src/panels/config/automation/automation-save-dialog/dialog-automation-save.ts b/src/panels/config/automation/automation-save-dialog/dialog-automation-save.ts
index 28374d127f..ffa9c57bcc 100644
--- a/src/panels/config/automation/automation-save-dialog/dialog-automation-save.ts
+++ b/src/panels/config/automation/automation-save-dialog/dialog-automation-save.ts
@@ -7,6 +7,7 @@ import "../../../../components/chips/ha-assist-chip";
import "../../../../components/chips/ha-chip-set";
import "../../../../components/ha-alert";
import "../../../../components/ha-area-picker";
+import "../../../../components/ha-dialog";
import "../../../../components/ha-dialog-footer";
import "../../../../components/ha-domain-icon";
import "../../../../components/ha-expansion-panel";
@@ -16,8 +17,7 @@ import "../../../../components/ha-suggest-with-ai-button";
import type { SuggestWithAIGenerateTask } from "../../../../components/ha-suggest-with-ai-button";
import "../../../../components/ha-svg-icon";
import "../../../../components/ha-textarea";
-import "../../../../components/ha-textfield";
-import "../../../../components/ha-dialog";
+import "../../../../components/input/ha-input";
import "../../category/ha-category-picker";
import { supportsMarkdownHelper } from "../../../../common/translations/markdown_support";
@@ -27,16 +27,16 @@ import type { ScriptConfig } from "../../../../data/script";
import type { HassDialog } from "../../../../dialogs/make-dialog-manager";
import { haStyle, haStyleDialog } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
-import type {
- EntityRegistryUpdate,
- SaveDialogParams,
-} from "./show-dialog-automation-save";
import {
type MetadataSuggestionResult,
generateMetadataSuggestionTask,
processMetadataSuggestion,
} from "../../common/suggest-metadata-ai";
import { buildEntityMetadataInspirations } from "../../common/suggest-metadata-inspirations";
+import type {
+ EntityRegistryUpdate,
+ SaveDialogParams,
+} from "./show-dialog-automation-save";
@customElement("ha-dialog-automation-save")
class DialogAutomationSave extends LitElement implements HassDialog {
@@ -129,7 +129,7 @@ class DialogAutomationSave extends LitElement implements HassDialog {
}
return html`
-
+ >
${this._params.domain === "script" &&
this._visibleOptionals.includes("icon")
? html`
${this._params.hideInputs
? nothing
- : html`
+ >
`
: nothing}
@@ -160,9 +160,8 @@ export default class HaAutomationTriggerEditor extends LitElement {
border-top: 1px solid var(--divider-color);
border-bottom: 1px solid var(--divider-color);
}
- ha-textfield {
- display: block;
- margin-bottom: 24px;
+ ha-input {
+ margin-bottom: var(--ha-space-3);
}
`,
];
diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-conversation.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-conversation.ts
index e5cd4f9d84..5fda6fd3e7 100644
--- a/src/panels/config/automation/trigger/types/ha-automation-trigger-conversation.ts
+++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-conversation.ts
@@ -1,11 +1,12 @@
-import { mdiClose } from "@mdi/js";
+import "@home-assistant/webawesome/dist/components/divider/divider";
+import { mdiClose, mdiPlus } from "@mdi/js";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query } from "lit/decorators";
import { ensureArray } from "../../../../../common/array/ensure-array";
import { fireEvent } from "../../../../../common/dom/fire_event";
import "../../../../../components/ha-icon-button";
-import "../../../../../components/ha-textfield";
-import type { HaTextField } from "../../../../../components/ha-textfield";
+import "../../../../../components/input/ha-input";
+import type { HaInput } from "../../../../../components/input/ha-input";
import type { ConversationTrigger } from "../../../../../data/automation";
import { showConfirmationDialog } from "../../../../../dialogs/generic/show-dialog-box";
import type { HomeAssistant } from "../../../../../types";
@@ -24,7 +25,7 @@ export class HaConversationTrigger
@property({ type: Boolean }) public disabled = false;
- @query("#option_input", true) private _optionInput?: HaTextField;
+ @query("#option_input", true) private _optionInput?: HaInput;
public static get defaultConfig(): ConversationTrigger {
return { trigger: "conversation", command: "" };
@@ -35,31 +36,31 @@ export class HaConversationTrigger
const commands = command ? ensureArray(command) : [];
return html`${commands.length
- ? commands.map(
- (option, index) => html`
-
-
-
- `
- )
+ ? html`${commands.map(
+ (option, index) => html`
+
+
+
+ `
+ )}
`
: nothing}
-
`;
+ >
+
+ `;
}
private _handleKeyAdd(ev: KeyboardEvent) {
@@ -104,14 +111,14 @@ export class HaConversationTrigger
input.value = "";
}
- private async _updateOption(ev: Event) {
+ private async _updateOption(ev: InputEvent) {
const index = (ev.target as any).index;
const command = [
...(Array.isArray(this.trigger.command)
? this.trigger.command
: [this.trigger.command]),
];
- command.splice(index, 1, (ev.target as HaTextField).value);
+ command.splice(index, 1, (ev.target as HaInput).value ?? "");
fireEvent(this, "value-changed", {
value: { ...this.trigger, command },
});
@@ -155,20 +162,8 @@ export class HaConversationTrigger
.option {
margin-top: 4px;
}
- ha-textfield {
- display: block;
- margin-bottom: 8px;
- --textfield-icon-trailing-padding: 0;
- }
- ha-textfield > ha-icon-button {
- position: relative;
- right: -8px;
- --ha-icon-button-size: 36px;
- --mdc-icon-size: 20px;
- color: var(--secondary-text-color);
- inset-inline-start: initial;
- inset-inline-end: -8px;
- direction: var(--direction);
+ ha-input {
+ margin-bottom: var(--ha-space-1);
}
#option_input {
margin-top: 8px;
@@ -177,6 +172,10 @@ export class HaConversationTrigger
margin-top: 8px;
margin-bottom: 8px;
}
+ wa-divider {
+ margin-top: var(--ha-space-2);
+ margin-bottom: var(--ha-space-3);
+ }
`;
}
diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts
index 0e4dfd1090..ad780f530e 100644
--- a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts
+++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts
@@ -1,8 +1,8 @@
-import { css, html, LitElement } from "lit";
+import { html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../../../../../common/dom/fire_event";
-import "../../../../../components/ha-textfield";
import "../../../../../components/ha-yaml-editor";
+import "../../../../../components/input/ha-input";
import "../../../../../components/user/ha-users-picker";
import type { EventTrigger } from "../../../../../data/automation";
import type { HomeAssistant } from "../../../../../types";
@@ -24,7 +24,7 @@ export class HaEventTrigger extends LitElement implements TriggerElement {
protected render() {
const { event_type, event_data, context } = this.trigger;
return html`
-
+ >
-
-
+
{
- const inputElement = ev.target.parentElement as HaTextField;
+ const inputElement = ev.target.parentElement as HaInput;
const url = this.hass.hassUrl(`/api/webhook/${inputElement.value}`);
await copyToClipboard(url);
@@ -229,11 +228,11 @@ export class HaWebhookTrigger extends LitElement {
display: flex;
}
- ha-textfield {
+ ha-input {
flex: 1;
}
- ha-textfield > ha-icon-button {
+ ha-input > ha-icon-button {
--ha-icon-button-size: 24px;
--mdc-icon-size: 18px;
color: var(--secondary-text-color);
diff --git a/src/panels/config/backup/dialogs/dialog-generate-backup.ts b/src/panels/config/backup/dialogs/dialog-generate-backup.ts
index 98c8397b15..a340cb276a 100644
--- a/src/panels/config/backup/dialogs/dialog-generate-backup.ts
+++ b/src/panels/config/backup/dialogs/dialog-generate-backup.ts
@@ -6,6 +6,7 @@ import { isComponentLoaded } from "../../../../common/config/is_component_loaded
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
+import "../../../../components/ha-dialog";
import "../../../../components/ha-dialog-footer";
import "../../../../components/ha-dialog-header";
import "../../../../components/ha-expansion-panel";
@@ -14,8 +15,8 @@ import "../../../../components/ha-icon-button-prev";
import "../../../../components/ha-md-list";
import "../../../../components/ha-md-list-item";
import "../../../../components/ha-select";
-import "../../../../components/ha-textfield";
-import "../../../../components/ha-dialog";
+import "../../../../components/input/ha-input";
+import type { HaInput } from "../../../../components/input/ha-input";
import type {
BackupAgent,
BackupConfig,
@@ -290,7 +291,7 @@ class DialogGenerateBackup extends LitElement implements HassDialog {
const disabledAgentIds = this._disabledAgentIds();
return html`
-
-
+
@@ -385,10 +386,10 @@ class DialogGenerateBackup extends LitElement implements HassDialog {
};
}
- private _nameChanged(ev) {
+ private _nameChanged(ev: InputEvent) {
this._formData = {
...this._formData!,
- name: ev.target.value,
+ name: (ev.target as HaInput).value ?? "",
};
}
@@ -468,7 +469,7 @@ class DialogGenerateBackup extends LitElement implements HassDialog {
overflow: hidden;
white-space: nowrap;
}
- ha-textfield {
+ ha-input {
width: 100%;
}
.content {
diff --git a/src/panels/config/integrations/integration-panels/zwave_js/add-node/zwave-js-add-node-code-input.ts b/src/panels/config/integrations/integration-panels/zwave_js/add-node/zwave-js-add-node-code-input.ts
index 3b26d00f55..2df7ce2b3a 100644
--- a/src/panels/config/integrations/integration-panels/zwave_js/add-node/zwave-js-add-node-code-input.ts
+++ b/src/panels/config/integrations/integration-panels/zwave_js/add-node/zwave-js-add-node-code-input.ts
@@ -1,11 +1,11 @@
-import { customElement, property } from "lit/decorators";
import { css, html, LitElement, nothing } from "lit";
+import { customElement, property } from "lit/decorators";
import { fireEvent } from "../../../../../../common/dom/fire_event";
-import type { HaTextField } from "../../../../../../components/ha-textfield";
+import type { HaInput } from "../../../../../../components/input/ha-input";
-import "../../../../../../components/ha-textfield";
import "../../../../../../components/ha-alert";
+import "../../../../../../components/input/ha-input";
@customElement("zwave-js-add-node-code-input")
export class ZWaveJsAddNodeCodeInput extends LitElement {
@@ -27,14 +27,14 @@ export class ZWaveJsAddNodeCodeInput extends LitElement {
${this.error
? html`${this.error}`
: nothing}
-
+ >
${this.referenceKey
? html`
${this.value.padEnd(5, "ยท")}${this.referenceKey}
@@ -50,24 +50,24 @@ export class ZWaveJsAddNodeCodeInput extends LitElement {
}
private _handleChange(ev: InputEvent): void {
- const inputElement = ev.target as HaTextField;
+ const inputElement = ev.target as HaInput;
if (
this.numeric &&
- (isNaN(Number(inputElement.value)) || inputElement.value.length > 5)
+ (isNaN(Number(inputElement.value)) || inputElement.value!.length > 5)
) {
inputElement.value = this.value;
return;
}
- this.value = (ev.target as HaTextField).value;
+ this.value = (ev.target as HaInput).value ?? "";
fireEvent(this, "value-changed", {
- value: (ev.target as HaTextField).value,
+ value: (ev.target as HaInput).value,
});
}
static styles = css`
- ha-textfield {
+ ha-input {
width: 100%;
}
ha-alert {