diff --git a/src/components/ha-form/ha-form-string.ts b/src/components/ha-form/ha-form-string.ts
index d7d4236bbc5e..8a7ec104923d 100644
--- a/src/components/ha-form/ha-form-string.ts
+++ b/src/components/ha-form/ha-form-string.ts
@@ -19,11 +19,14 @@ import type {
HaFormStringData,
HaFormStringSchema,
} from "./types";
+import { HomeAssistant } from "../../types";
const MASKED_FIELDS = ["password", "secret", "token"];
@customElement("ha-form-string")
export class HaFormString extends LitElement implements HaFormElement {
+ @property() public hass!: HomeAssistant;
+
@property() public schema!: HaFormStringSchema;
@property() public data!: HaFormStringData;
@@ -78,7 +81,11 @@ export class HaFormString extends LitElement implements HaFormElement {
return html`
diff --git a/src/components/ha-selector/ha-selector-text.ts b/src/components/ha-selector/ha-selector-text.ts
index c3e2b969e4ff..89f764f626e8 100644
--- a/src/components/ha-selector/ha-selector-text.ts
+++ b/src/components/ha-selector/ha-selector-text.ts
@@ -76,7 +76,11 @@ export class HaTextSelector extends LitElement {
${this.selector.text?.type === "password"
? html``
diff --git a/src/translations/en.json b/src/translations/en.json
index 566fedce9640..20e3ad35d3e3 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -328,6 +328,10 @@
"file": {
"upload_failed": "Upload failed",
"unknown_file": "Unknown file"
+ },
+ "text": {
+ "show_password": "Show password",
+ "hide_password": "Hide password"
}
},
"logbook": {