From 9987227811d8fa9732976a43490ee5d7e1ca30bd Mon Sep 17 00:00:00 2001 From: karwosts Date: Sat, 25 May 2024 06:21:20 -0700 Subject: [PATCH] Rename energy 'Today' button to 'Now' --- .../lovelace/components/hui-energy-period-selector.ts | 6 +++--- src/translations/en.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/components/hui-energy-period-selector.ts b/src/panels/lovelace/components/hui-energy-period-selector.ts index 11e863560750..0a7e1487b069 100644 --- a/src/panels/lovelace/components/hui-energy-period-selector.ts +++ b/src/panels/lovelace/components/hui-energy-period-selector.ts @@ -261,9 +261,9 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) { ${!this.narrow - ? html` + ? html` ${this.hass.localize( - "ui.panel.lovelace.components.energy_period_selector.today" + "ui.panel.lovelace.components.energy_period_selector.now" )} ` : nothing} @@ -376,7 +376,7 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) { this._updateCollectionPeriod(); } - private _pickToday() { + private _pickNow() { if (!this._startDate) return; const range = this._simpleRange( diff --git a/src/translations/en.json b/src/translations/en.json index 04cd5409da3c..1e4147981734 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6183,7 +6183,7 @@ "invalid_format": "Invalid display format" }, "energy_period_selector": { - "today": "Today", + "now": "Now", "previous": "Previous", "next": "Next", "compare": "Compare data"