mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Fix ha-relative-time
usage for tags and sun (#7944)
This commit is contained in:
parent
8a42e65c6a
commit
4930532c7b
@ -13,7 +13,7 @@ import type { HomeAssistant } from "../types";
|
||||
class HaRelativeTime extends UpdatingElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ attribute: false }) public datetime?: string;
|
||||
@property({ attribute: false }) public datetime?: string | Date;
|
||||
|
||||
private _interval?: number;
|
||||
|
||||
|
@ -44,7 +44,7 @@ class MoreInfoSun extends LitElement {
|
||||
>
|
||||
<ha-relative-time
|
||||
.hass=${this.hass}
|
||||
.datetimeObj=${item === "ris" ? risingDate : settingDate}
|
||||
.datetime=${item === "ris" ? risingDate : settingDate}
|
||||
></ha-relative-time>
|
||||
</div>
|
||||
<div class="value">
|
||||
|
@ -84,7 +84,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
${tag.last_scanned_datetime
|
||||
? html`<ha-relative-time
|
||||
.hass=${this.hass}
|
||||
.datetimeObj=${tag.last_scanned_datetime}
|
||||
.datetime=${tag.last_scanned_datetime}
|
||||
></ha-relative-time>`
|
||||
: this.hass.localize("ui.panel.config.tags.never_scanned")}
|
||||
</div>`
|
||||
@ -103,7 +103,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
${last_scanned_datetime
|
||||
? html`<ha-relative-time
|
||||
.hass=${this.hass}
|
||||
.datetimeObj=${last_scanned_datetime}
|
||||
.datetime=${last_scanned_datetime}
|
||||
></ha-relative-time>`
|
||||
: this.hass.localize("ui.panel.config.tags.never_scanned")}
|
||||
`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user