Update Pickers and selectors with required (#12151)

* Update Pickers and selectors with required

* Use native * for device and entity
This commit is contained in:
Zack Barett
2022-03-30 06:48:56 -05:00
committed by GitHub
parent f5af63a50e
commit 7ab54ee5ce
35 changed files with 159 additions and 50 deletions

View File

@@ -2,8 +2,8 @@ import { html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { useAmPm } from "../common/datetime/use_am_pm";
import { fireEvent } from "../common/dom/fire_event";
import "./ha-base-time-input";
import { FrontendLocaleData } from "../data/translation";
import "./ha-base-time-input";
import type { TimeChangedEvent } from "./ha-base-time-input";
@customElement("ha-time-input")
@@ -16,6 +16,8 @@ export class HaTimeInput extends LitElement {
@property({ type: Boolean }) public disabled = false;
@property({ type: Boolean }) public required = false;
@property({ type: Boolean, attribute: "enable-second" })
public enableSecond = false;
@@ -43,6 +45,7 @@ export class HaTimeInput extends LitElement {
.disabled=${this.disabled}
@value-changed=${this._timeChanged}
.enableSecond=${this.enableSecond}
.required=${this.required}
></ha-base-time-input>
`;
}