Skip to content

Commit

Permalink
Display year conditionally when script was last triggered on script l…
Browse files Browse the repository at this point in the history
…ist (#24012)

Display year conditionally when script was last triggered in script list
  • Loading branch information
jpbede authored Feb 1, 2025
1 parent f8de2c6 commit fd1e31c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/panels/config/script/ha-script-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { styleMap } from "lit/directives/style-map";
import memoizeOne from "memoize-one";
import { computeCssColor } from "../../../common/color/compute-color";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { formatShortDateTime } from "../../../common/datetime/format_date_time";
import { formatShortDateTimeWithConditionalYear } from "../../../common/datetime/format_date_time";
import { relativeTime } from "../../../common/datetime/relative_time";
import { storage } from "../../../common/decorators/storage";
import type { HASSDomEvent } from "../../../common/dom/fire_event";
Expand Down Expand Up @@ -304,7 +304,7 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
return html`
${script.last_triggered
? dayDifference > 3
? formatShortDateTime(
? formatShortDateTimeWithConditionalYear(
date,
this.hass.locale,
this.hass.config
Expand Down

0 comments on commit fd1e31c

Please sign in to comment.