diff --git a/src/components/ha-base-time-input.ts b/src/components/ha-base-time-input.ts index 4c1f1d7ff4..9b102faee5 100644 --- a/src/components/ha-base-time-input.ts +++ b/src/components/ha-base-time-input.ts @@ -1,12 +1,13 @@ -import { LitElement, html, TemplateResult, css } from "lit"; -import { customElement, property } from "lit/decorators"; -import "./ha-select"; import "@material/mwc-list/mwc-list-item"; -import "./ha-textfield"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { stopPropagation } from "../common/dom/stop_propagation"; +import "./ha-select"; +import "./ha-textfield"; export interface TimeChangedEvent { + days?: number; hours: number; minutes: number; seconds: number; @@ -46,6 +47,11 @@ export class HaBaseTimeInput extends LitElement { */ @property({ type: Boolean }) disabled = false; + /** + * day + */ + @property({ type: Number }) days = 0; + /** * hour */ @@ -66,6 +72,11 @@ export class HaBaseTimeInput extends LitElement { */ @property({ type: Number }) milliseconds = 0; + /** + * Label for the day input + */ + @property() dayLabel = ""; + /** * Label for the hour input */ @@ -96,6 +107,11 @@ export class HaBaseTimeInput extends LitElement { */ @property({ type: Boolean }) enableMillisecond = false; + /** + * show the day field + */ + @property({ type: Boolean }) enableDay = false; + /** * limit hours input */ @@ -115,6 +131,29 @@ export class HaBaseTimeInput extends LitElement { return html` ${this.label ? html`` : ""}