mirror of
https://github.com/GeorgeSG/lovelace-time-picker-card.git
synced 2026-09-06 02:18:44 +00:00
refactor
This commit is contained in:
@@ -60,8 +60,9 @@ export class TimePickerCard extends LitElement {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hour = new Hour(this.entity?.attributes.hour ?? 0, this.config.hour_step);
|
const { hour, minute } = this.entity?.attributes ?? { hour: 0, minute: 0 };
|
||||||
this.minute = new Minute(this.entity?.attributes.minute ?? 0, this.config.minute_step);
|
this.hour = new Hour(hour, this.config.hour_step);
|
||||||
|
this.minute = new Minute(minute, this.config.minute_step);
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-card class="time-picker-ha-card">
|
<ha-card class="time-picker-ha-card">
|
||||||
|
|||||||
Reference in New Issue
Block a user