${this.devices.map(
- (device) =>
- html`
-
-
- ${computeDeviceName(device, this.hass)}
- ${!device.model && !device.manufacturer
- ? html` `
- : html`${device.model}
- ${device.manufacturer
- ? html`(${device.manufacturer})`
- : ""}`}
-
-
+ (device) => html`
+
+
+ ${computeDeviceName(device, this.hass)}
+ ${!device.model && !device.manufacturer
+ ? html` `
+ : html`${device.model}
+ ${device.manufacturer
+ ? html`(${device.manufacturer})`
+ : ""}`}
- `
+
+
+ `
)}
`}
diff --git a/src/dialogs/more-info/components/lights/dialog-light-color-favorite.ts b/src/dialogs/more-info/components/lights/dialog-light-color-favorite.ts
index 410ba70c04..8549c90682 100644
--- a/src/dialogs/more-info/components/lights/dialog-light-color-favorite.ts
+++ b/src/dialogs/more-info/components/lights/dialog-light-color-favorite.ts
@@ -150,22 +150,21 @@ class DialogLightColorFavorite extends LitElement {
? html`
${this._modes.map(
- (value) =>
- html`
-
-
-
- `
+ (value) => html`
+
+
+
+ `
)}
`
diff --git a/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts b/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts
index cf50ae5c04..90b18f4223 100644
--- a/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts
+++ b/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts
@@ -415,7 +415,7 @@ class LightRgbColorPicker extends LitElement {
number,
number,
number,
- number
+ number,
];
this._applyColor({ rgbww_color });
} else if (lightSupportsColorMode(this.stateObj!, LightColorMode.RGBW)) {
@@ -427,7 +427,7 @@ class LightRgbColorPicker extends LitElement {
number,
number,
number,
- number
+ number,
];
this._applyColor({ rgbw_color });
}
diff --git a/src/dialogs/more-info/controls/more-info-configurator.ts b/src/dialogs/more-info/controls/more-info-configurator.ts
index 0e68a22c7e..76c2fb9f5b 100644
--- a/src/dialogs/more-info/controls/more-info-configurator.ts
+++ b/src/dialogs/more-info/controls/more-info-configurator.ts
@@ -36,12 +36,13 @@ export class MoreInfoConfigurator extends LitElement {
`
: ""}
${this.stateObj.attributes.fields.map(
- (field) => html`
`
+ (field) =>
+ html`
`
)}
${this.stateObj.attributes.submit_caption
? html`
diff --git a/src/dialogs/more-info/controls/more-info-fan.ts b/src/dialogs/more-info/controls/more-info-fan.ts
index 588397c5ce..ae841e996c 100644
--- a/src/dialogs/more-info/controls/more-info-fan.ts
+++ b/src/dialogs/more-info/controls/more-info-fan.ts
@@ -299,23 +299,22 @@ class MoreInfoFan extends LitElement {
>
${this.stateObj.attributes.preset_modes?.map(
- (mode) =>
- html`
-
- ${computeAttributeValueDisplay(
- this.hass.localize,
- this.stateObj!,
- this.hass.locale,
- this.hass.config,
- this.hass.entities,
- "preset_mode",
- mode
- )}
-
- `
+ (mode) => html`
+
+ ${computeAttributeValueDisplay(
+ this.hass.localize,
+ this.stateObj!,
+ this.hass.locale,
+ this.hass.config,
+ this.hass.entities,
+ "preset_mode",
+ mode
+ )}
+
+ `
)}
`
diff --git a/src/dialogs/more-info/controls/more-info-media_player.ts b/src/dialogs/more-info/controls/more-info-media_player.ts
index 047605cd8a..1d9fcbe0fc 100644
--- a/src/dialogs/more-info/controls/more-info-media_player.ts
+++ b/src/dialogs/more-info/controls/more-info-media_player.ts
@@ -156,20 +156,19 @@ class MoreInfoMediaPlayer extends LitElement {
@closed=${stopPropagation}
>
${stateObj.attributes.source_list!.map(
- (source) =>
- html`
- ${computeAttributeValueDisplay(
- this.hass.localize,
- stateObj,
- this.hass.locale,
- this.hass.config,
- this.hass.entities,
- "source",
- source
- )}
- `
+ (source) => html`
+ ${computeAttributeValueDisplay(
+ this.hass.localize,
+ stateObj,
+ this.hass.locale,
+ this.hass.config,
+ this.hass.entities,
+ "source",
+ source
+ )}
+ `
)}
diff --git a/src/dialogs/notifications/notification-drawer.ts b/src/dialogs/notifications/notification-drawer.ts
index b11a45a345..57407a62ad 100644
--- a/src/dialogs/notifications/notification-drawer.ts
+++ b/src/dialogs/notifications/notification-drawer.ts
@@ -108,12 +108,13 @@ export class HuiNotificationDrawer extends LitElement {
${notifications.length
? html`${notifications.map(
- (notification) => html`
-
-
`
+ (notification) =>
+ html`
+
+
`
)}
${this._notifications.length > 1
? html`
diff --git a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts
index de68790067..b479b07a22 100644
--- a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts
+++ b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts
@@ -158,20 +158,24 @@ export class HaVoiceCommandDialog extends LitElement {
>
${this._pipelines?.map(
- (pipeline) => html`
- ${pipeline.name}${pipeline.id === this._preferredPipeline
- ? html`
-
- `
- : nothing}
- `
+ (pipeline) =>
+ html`
+ ${pipeline.name}${pipeline.id === this._preferredPipeline
+ ? html`
+
+ `
+ : nothing}
+ `
)}
${this.hass.user?.is_admin
? html`
diff --git a/src/layouts/hass-tabs-subpage.ts b/src/layouts/hass-tabs-subpage.ts
index bbc978fd7d..e8c470df3b 100644
--- a/src/layouts/hass-tabs-subpage.ts
+++ b/src/layouts/hass-tabs-subpage.ts
@@ -94,26 +94,25 @@ class HassTabsSubpage extends LitElement {
}
return shownTabs.map(
- (page) =>
- html`
-
-
- ${page.iconPath
- ? html``
- : ""}
-
-
- `
+ (page) => html`
+
+
+ ${page.iconPath
+ ? html``
+ : ""}
+
+
+ `
);
}
);
diff --git a/src/panels/calendar/ha-panel-calendar.ts b/src/panels/calendar/ha-panel-calendar.ts
index 878d6348fa..c2562d1357 100644
--- a/src/panels/calendar/ha-panel-calendar.ts
+++ b/src/panels/calendar/ha-panel-calendar.ts
@@ -79,23 +79,22 @@ class PanelCalendar extends LitElement {
${this.hass.localize("ui.components.calendar.my_calendars")}
${this._calendars.map(
- (selCal) =>
- html`
-
-
-
-
-
- `
+ (selCal) => html`
+
+
+
+
+
+ `
)}
= (item) => html`
- ${item.name}
-`;
+const rowRenderer: ComboBoxLitRenderer = (item) =>
+ html`
+ ${item.name}
+ `;
@customElement("dialog-add-application-credential")
export class DialogAddApplicationCredential extends LitElement {
diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts
index 4edc723c0e..8a326e6867 100644
--- a/src/panels/config/areas/ha-config-area-page.ts
+++ b/src/panels/config/areas/ha-config-area-page.ts
@@ -283,15 +283,14 @@ class HaConfigAreaPage extends SubscribeMixin(LitElement) {
.header=${this.hass.localize("ui.panel.config.devices.caption")}
>${devices.length
? devices.map(
- (device) =>
- html`
-
-
- ${device.name}
-
-
-
- `
+ (device) => html`
+
+
+ ${device.name}
+
+
+
+ `
)
: html`
html`
-
-
- ${this.hass.localize(
- "ui.panel.config.automation.editor.actions.type.choose.option",
- "number",
- idx + 1
- )}:
- ${this._getDescription(option, idx)}
-
+ (option, idx) =>
+ html`
+
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.editor.actions.type.choose.option",
+ "number",
+ idx + 1
+ )}:
+ ${this._getDescription(option, idx)}
+
-
-
-
- ${this.hass.localize(
- "ui.panel.config.automation.editor.actions.type.choose.conditions"
- )}:
-
- (
- option.conditions
+
-
- ${this.hass.localize(
- "ui.panel.config.automation.editor.actions.type.choose.sequence"
- )}:
-
-
-
-
- `
+ .path=${mdiDelete}
+ >
+
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.editor.actions.type.choose.conditions"
+ )}:
+
+ (
+ option.conditions
+ )}
+ .reOrderMode=${this.reOrderMode}
+ .disabled=${this.disabled}
+ .hass=${this.hass}
+ .idx=${idx}
+ @value-changed=${this._conditionChanged}
+ >
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.editor.actions.type.choose.sequence"
+ )}:
+
+
+
+
+ `
)}
- html`
- this._showInfo(automation),
- },
- {
- path: mdiPlay,
- label: this.hass.localize(
- "ui.panel.config.automation.editor.run"
- ),
- action: () => this._runActions(automation),
- },
- {
- path: mdiTransitConnection,
- label: this.hass.localize(
- "ui.panel.config.automation.editor.show_trace"
- ),
- action: () => this._showTrace(automation),
- },
- {
- divider: true,
- },
- {
- path: mdiContentDuplicate,
- label: this.hass.localize(
- "ui.panel.config.automation.picker.duplicate"
- ),
- action: () => this.duplicate(automation),
- },
- {
- path:
- automation.state === "off"
- ? mdiPlayCircleOutline
- : mdiStopCircleOutline,
- label:
- automation.state === "off"
- ? this.hass.localize(
- "ui.panel.config.automation.editor.enable"
- )
- : this.hass.localize(
- "ui.panel.config.automation.editor.disable"
- ),
- action: () => this._toggle(automation),
- },
- {
- label: this.hass.localize(
- "ui.panel.config.automation.picker.delete"
- ),
- path: mdiDelete,
- action: () => this._deleteConfirm(automation),
- warning: true,
- },
- ]}
- >
-
- `,
+ template: (_: string, automation: any) => html`
+ this._showInfo(automation),
+ },
+ {
+ path: mdiPlay,
+ label: this.hass.localize(
+ "ui.panel.config.automation.editor.run"
+ ),
+ action: () => this._runActions(automation),
+ },
+ {
+ path: mdiTransitConnection,
+ label: this.hass.localize(
+ "ui.panel.config.automation.editor.show_trace"
+ ),
+ action: () => this._showTrace(automation),
+ },
+ {
+ divider: true,
+ },
+ {
+ path: mdiContentDuplicate,
+ label: this.hass.localize(
+ "ui.panel.config.automation.picker.duplicate"
+ ),
+ action: () => this.duplicate(automation),
+ },
+ {
+ path:
+ automation.state === "off"
+ ? mdiPlayCircleOutline
+ : mdiStopCircleOutline,
+ label:
+ automation.state === "off"
+ ? this.hass.localize(
+ "ui.panel.config.automation.editor.enable"
+ )
+ : this.hass.localize(
+ "ui.panel.config.automation.editor.disable"
+ ),
+ action: () => this._toggle(automation),
+ },
+ {
+ label: this.hass.localize(
+ "ui.panel.config.automation.picker.delete"
+ ),
+ path: mdiDelete,
+ action: () => this._deleteConfirm(automation),
+ warning: true,
+ },
+ ]}
+ >
+
+ `,
};
return columns;
}
diff --git a/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts b/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts
index 9731a96394..3be3fbe024 100644
--- a/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts
+++ b/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts
@@ -133,110 +133,107 @@ export class ThingTalkPlaceholders extends SubscribeMixin(LitElement) {
${this._error ? html`
${this._error}
` : ""}
${Object.entries(this.placeholders).map(
- ([type, placeholders]) =>
- html`
-
- ${this.hass.localize(
- `ui.panel.config.automation.editor.${type}s.name`
- )}:
-
- ${placeholders.map((placeholder) => {
- if (placeholder.fields.includes("device_id")) {
- const extraInfo = getPath(this._extraInfo, [
- type,
- placeholder.index,
- ]);
- return html`
-
- ${extraInfo && extraInfo.manualEntity
- ? html`
-
- ${this.hass.localize(
- `ui.panel.config.automation.thingtalk.link_devices.ambiguous_entities`
- )}
-
- ${Object.keys(extraInfo.manualEntity).map(
- (idx) => html`
-
{
- const devId =
- this._placeholderValues[type][
- placeholder.index
- ][idx].device_id;
- return this._deviceEntityLookup[
- devId
- ].includes(entityState.entity_id);
- }}
- >
- `
- )}
- `
- : ""}
- `;
- }
- if (placeholder.fields.includes("entity_id")) {
- return html`
-
- `;
- }
+ ([type, placeholders]) => html`
+
+ ${this.hass.localize(
+ `ui.panel.config.automation.editor.${type}s.name`
+ )}:
+
+ ${placeholders.map((placeholder) => {
+ if (placeholder.fields.includes("device_id")) {
+ const extraInfo = getPath(this._extraInfo, [
+ type,
+ placeholder.index,
+ ]);
return html`
-
- ${this.hass.localize(
- `ui.panel.config.automation.thingtalk.link_devices.unknown_placeholder`
- )}
- ${placeholder.domains}
- ${placeholder.fields.map(
- (field) => html` ${field}
`
+
+ >
+ ${extraInfo && extraInfo.manualEntity
+ ? html`
+
+ ${this.hass.localize(
+ `ui.panel.config.automation.thingtalk.link_devices.ambiguous_entities`
+ )}
+
+ ${Object.keys(extraInfo.manualEntity).map(
+ (idx) => html`
+
{
+ const devId =
+ this._placeholderValues[type][
+ placeholder.index
+ ][idx].device_id;
+ return this._deviceEntityLookup[
+ devId
+ ].includes(entityState.entity_id);
+ }}
+ >
+ `
+ )}
+ `
+ : ""}
`;
- })}
- `
+ }
+ if (placeholder.fields.includes("entity_id")) {
+ return html`
+
+ `;
+ }
+ return html`
+
+ ${this.hass.localize(
+ `ui.panel.config.automation.thingtalk.link_devices.unknown_placeholder`
+ )}
+ ${placeholder.domains}
+ ${placeholder.fields.map((field) => html` ${field}
`)}
+
+ `;
+ })}
+ `
)}
diff --git a/src/panels/config/blueprint/ha-blueprint-overview.ts b/src/panels/config/blueprint/ha-blueprint-overview.ts
index 44fd7f79c8..c926a2c581 100644
--- a/src/panels/config/blueprint/ha-blueprint-overview.ts
+++ b/src/panels/config/blueprint/ha-blueprint-overview.ts
@@ -125,11 +125,10 @@ class HaBlueprintOverview extends LitElement {
direction: "asc",
grows: true,
template: narrow
- ? (name, entity: any) =>
- html`
- ${name}
- ${entity.path}
- `
+ ? (name, entity: any) => html`
+ ${name}
+ ${entity.path}
+ `
: undefined,
},
type: {
diff --git a/src/panels/config/core/ha-config-system-navigation.ts b/src/panels/config/core/ha-config-system-navigation.ts
index 9225670215..ade0cf81a8 100644
--- a/src/panels/config/core/ha-config-system-navigation.ts
+++ b/src/panels/config/core/ha-config-system-navigation.ts
@@ -181,9 +181,8 @@ class HaConfigSystemNavigation extends LitElement {
const hardwareInfo: HardwareInfo = await this.hass.callWS({
type: "hardware/info",
});
- this._boardName = hardwareInfo?.hardware.find(
- (hw) => hw.board !== null
- )?.name;
+ this._boardName = hardwareInfo?.hardware.find((hw) => hw.board !== null)
+ ?.name;
} else if (isHassioLoaded) {
const osData: HassioHassOSInfo = await fetchHassioHassOsInfo(this.hass);
if (osData.board) {
diff --git a/src/panels/config/devices/device-detail/ha-device-automation-card.ts b/src/panels/config/devices/device-detail/ha-device-automation-card.ts
index 9bf3e433ea..7ea0ec1026 100644
--- a/src/panels/config/devices/device-detail/ha-device-automation-card.ts
+++ b/src/panels/config/devices/device-detail/ha-device-automation-card.ts
@@ -20,7 +20,7 @@ declare global {
}
export abstract class HaDeviceAutomationCard<
- T extends DeviceAutomation
+ T extends DeviceAutomation,
> extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -76,20 +76,19 @@ export abstract class HaDeviceAutomationCard<
${automations.map(
- (automation, idx) =>
- html`
-
- ${this._localizeDeviceAutomation(
- this.hass,
- this.entityReg!,
- automation
- )}
-
- `
+ (automation, idx) => html`
+
+ ${this._localizeDeviceAutomation(
+ this.hass,
+ this.entityReg!,
+ automation
+ )}
+
+ `
)}
${!this._showSecondary && automations.length < this.automations.length
diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts
index 2cd52f253c..2c2051065e 100644
--- a/src/panels/config/devices/ha-config-device-page.ts
+++ b/src/panels/config/devices/ha-config-device-page.ts
@@ -376,32 +376,30 @@ export class HaConfigDevicePage extends LitElement {
const firstDeviceAction = actions.shift();
if (device.disabled_by) {
- deviceInfo.push(
- html`
-
- ${this.hass.localize(
- "ui.panel.config.devices.enabled_cause",
- "type",
- this.hass.localize(
- `ui.panel.config.devices.type.${device.entry_type || "device"}`
- ),
- "cause",
- this.hass.localize(
- `ui.panel.config.devices.disabled_by.${device.disabled_by}`
- )
- )}
-
- ${device.disabled_by === "user"
- ? html`
-
-
- ${this.hass.localize("ui.common.enable")}
-
-
- `
- : ""}
- `
- );
+ deviceInfo.push(html`
+
+ ${this.hass.localize(
+ "ui.panel.config.devices.enabled_cause",
+ "type",
+ this.hass.localize(
+ `ui.panel.config.devices.type.${device.entry_type || "device"}`
+ ),
+ "cause",
+ this.hass.localize(
+ `ui.panel.config.devices.disabled_by.${device.disabled_by}`
+ )
+ )}
+
+ ${device.disabled_by === "user"
+ ? html`
+
+
+ ${this.hass.localize("ui.common.enable")}
+
+
+ `
+ : ""}
+ `);
}
this._renderIntegrationInfo(device, integrations, deviceInfo);
@@ -751,12 +749,11 @@ export class HaConfigDevicePage extends LitElement {
? html`
${this._deviceAlerts.map(
- (alert) =>
- html`
-
- ${alert.text}
-
- `
+ (alert) => html`
+
+ ${alert.text}
+
+ `
)}
`
diff --git a/src/panels/config/energy/components/ha-energy-battery-settings.ts b/src/panels/config/energy/components/ha-energy-battery-settings.ts
index dc4923f27a..9d27716a8a 100644
--- a/src/panels/config/energy/components/ha-energy-battery-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-battery-settings.ts
@@ -76,13 +76,12 @@ export class EnergyBatterySettings extends LitElement {
>
${batteryValidation.map(
- (result) =>
- html`
-
- `
+ (result) => html`
+
+ `
)}
diff --git a/src/panels/config/energy/components/ha-energy-device-settings.ts b/src/panels/config/energy/components/ha-energy-device-settings.ts
index 52012f4106..dc2df5472f 100644
--- a/src/panels/config/energy/components/ha-energy-device-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-device-settings.ts
@@ -68,13 +68,12 @@ export class EnergyDeviceSettings extends LitElement {
>
${this.validationResult?.device_consumption.map(
- (result) =>
- html`
-
- `
+ (result) => html`
+
+ `
)}
${this.hass.localize(
diff --git a/src/panels/config/energy/components/ha-energy-gas-settings.ts b/src/panels/config/energy/components/ha-energy-gas-settings.ts
index 14f6653f05..135d686ebc 100644
--- a/src/panels/config/energy/components/ha-energy-gas-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-gas-settings.ts
@@ -74,13 +74,12 @@ export class EnergyGasSettings extends LitElement {
>
${gasValidation.map(
- (result) =>
- html`
-
- `
+ (result) => html`
+
+ `
)}
${this.hass.localize("ui.panel.config.energy.gas.gas_consumption")}
diff --git a/src/panels/config/energy/components/ha-energy-solar-settings.ts b/src/panels/config/energy/components/ha-energy-solar-settings.ts
index 4fe65f0188..ccc7e492e7 100644
--- a/src/panels/config/energy/components/ha-energy-solar-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-solar-settings.ts
@@ -79,13 +79,12 @@ export class EnergySolarSettings extends LitElement {
>
${solarValidation.map(
- (result) =>
- html`
-
- `
+ (result) => html`
+
+ `
)}
diff --git a/src/panels/config/energy/components/ha-energy-water-settings.ts b/src/panels/config/energy/components/ha-energy-water-settings.ts
index a997629695..278b3f747e 100644
--- a/src/panels/config/energy/components/ha-energy-water-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-water-settings.ts
@@ -75,13 +75,12 @@ export class EnergyWaterSettings extends LitElement {
>
${waterValidation.map(
- (result) =>
- html`
-
- `
+ (result) => html`
+
+ `
)}
${this.hass.localize(
diff --git a/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts
index 2cc14377b5..dd05a30612 100644
--- a/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts
+++ b/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts
@@ -139,31 +139,32 @@ export class DialogEnergySolarSettings
${this._forecast
? html`
${this._configEntries?.map(
- (entry) => html`
+ html`
+
${entry.title}
+ `}
>
-
${entry.title}
-
`}
- >
-
-
- `
+
+
+ `
)}
${this.hass.localize(
diff --git a/src/panels/config/entities/entity-registry-settings-editor.ts b/src/panels/config/entities/entity-registry-settings-editor.ts
index 96d1214370..940ea5de59 100644
--- a/src/panels/config/entities/entity-registry-settings-editor.ts
+++ b/src/panels/config/entities/entity-registry-settings-editor.ts
@@ -892,11 +892,9 @@ export class EntityRegistrySettingsEditor extends LitElement {
"ui.dialogs.entity_registry.editor.use_device_area"
)}
${this.hass.devices[this.entry.device_id].area_id
- ? `(${
- this.hass.areas[
- this.hass.devices[this.entry.device_id].area_id!
- ]?.name
- })`
+ ? `(${this.hass.areas[
+ this.hass.devices[this.entry.device_id].area_id!
+ ]?.name})`
: ""}
- html`
- ${name}
-
- ${entity.entity_id} |
- ${this.hass.localize(`component.${entity.platform}.title`) ||
- entity.platform}
-
- `
+ ? (name, entity: EntityRow) => html`
+ ${name}
+
+ ${entity.entity_id} |
+ ${this.hass.localize(`component.${entity.platform}.title`) ||
+ entity.platform}
+
+ `
: undefined,
},
entity_id: {
diff --git a/src/panels/config/hardware/dialog-hardware-available.ts b/src/panels/config/hardware/dialog-hardware-available.ts
index d60d801b19..817ee0db12 100644
--- a/src/panels/config/hardware/dialog-hardware-available.ts
+++ b/src/panels/config/hardware/dialog-hardware-available.ts
@@ -110,51 +110,50 @@ class DialogHardwareAvailable extends LitElement implements HassDialog {
${devices.map(
- (device) =>
- html`
-
-
-
- ${this.hass.localize(
- "ui.panel.config.hardware.available_hardware.subsystem"
- )}:
-
- ${device.subsystem}
-
-
-
- ${this.hass.localize(
- "ui.panel.config.hardware.available_hardware.device_path"
- )}:
-
- ${device.dev_path}
-
- ${device.by_id
- ? html`
-
-
- ${this.hass.localize(
- "ui.panel.config.hardware.available_hardware.id"
- )}:
-
- ${device.by_id}
-
- `
- : ""}
-
-
- ${this.hass.localize(
- "ui.panel.config.hardware.available_hardware.attributes"
- )}:
-
-
${dump(device.attributes, { indent: 2 })}
-
-
- `
+ (device) => html`
+
+
+
+ ${this.hass.localize(
+ "ui.panel.config.hardware.available_hardware.subsystem"
+ )}:
+
+ ${device.subsystem}
+
+
+
+ ${this.hass.localize(
+ "ui.panel.config.hardware.available_hardware.device_path"
+ )}:
+
+ ${device.dev_path}
+
+ ${device.by_id
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.panel.config.hardware.available_hardware.id"
+ )}:
+
+ ${device.by_id}
+
+ `
+ : ""}
+
+
+ ${this.hass.localize(
+ "ui.panel.config.hardware.available_hardware.attributes"
+ )}:
+
+
${dump(device.attributes, { indent: 2 })}
+
+
+ `
)}
`;
diff --git a/src/panels/config/helpers/forms/ha-counter-form.ts b/src/panels/config/helpers/forms/ha-counter-form.ts
index 92c844af88..c2b03630ab 100644
--- a/src/panels/config/helpers/forms/ha-counter-form.ts
+++ b/src/panels/config/helpers/forms/ha-counter-form.ts
@@ -53,10 +53,11 @@ class HaCounterForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-input_boolean-form.ts b/src/panels/config/helpers/forms/ha-input_boolean-form.ts
index 82912b4552..870d83cf22 100644
--- a/src/panels/config/helpers/forms/ha-input_boolean-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_boolean-form.ts
@@ -31,10 +31,11 @@ class HaInputBooleanForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-input_button-form.ts b/src/panels/config/helpers/forms/ha-input_button-form.ts
index a67b65d5d3..0b8ec14ede 100644
--- a/src/panels/config/helpers/forms/ha-input_button-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_button-form.ts
@@ -31,10 +31,11 @@ class HaInputButtonForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-input_datetime-form.ts b/src/panels/config/helpers/forms/ha-input_datetime-form.ts
index 61e70d735a..c44fe057c8 100644
--- a/src/panels/config/helpers/forms/ha-input_datetime-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_datetime-form.ts
@@ -45,10 +45,11 @@ class HaInputDateTimeForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-input_number-form.ts b/src/panels/config/helpers/forms/ha-input_number-form.ts
index f090713f72..0c83b7861c 100644
--- a/src/panels/config/helpers/forms/ha-input_number-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_number-form.ts
@@ -60,10 +60,11 @@ class HaInputNumberForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-input_select-form.ts b/src/panels/config/helpers/forms/ha-input_select-form.ts
index 378c6aa179..55217382bd 100644
--- a/src/panels/config/helpers/forms/ha-input_select-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_select-form.ts
@@ -43,10 +43,11 @@ class HaInputSelectForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-input_text-form.ts b/src/panels/config/helpers/forms/ha-input_text-form.ts
index d8ba12b444..90252e2ab0 100644
--- a/src/panels/config/helpers/forms/ha-input_text-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_text-form.ts
@@ -50,10 +50,11 @@ class HaInputTextForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-schedule-form.ts b/src/panels/config/helpers/forms/ha-schedule-form.ts
index 1656fafb00..5a503eef1b 100644
--- a/src/panels/config/helpers/forms/ha-schedule-form.ts
+++ b/src/panels/config/helpers/forms/ha-schedule-form.ts
@@ -98,10 +98,11 @@ class HaScheduleForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/forms/ha-timer-form.ts b/src/panels/config/helpers/forms/ha-timer-form.ts
index 1d427ef7af..4108f7fa43 100644
--- a/src/panels/config/helpers/forms/ha-timer-form.ts
+++ b/src/panels/config/helpers/forms/ha-timer-form.ts
@@ -39,10 +39,11 @@ class HaTimerForm extends LitElement {
}
public focus() {
- this.updateComplete.then(() =>
- (
- this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
- )?.focus()
+ this.updateComplete.then(
+ () =>
+ (
+ this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
+ )?.focus()
);
}
diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts
index 41d5f03441..55b9cb1bb7 100644
--- a/src/panels/config/helpers/ha-config-helpers.ts
+++ b/src/panels/config/helpers/ha-config-helpers.ts
@@ -96,13 +96,12 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
filterable: true,
grows: true,
direction: "asc",
- template: (name, item: any) =>
- html`
- ${name}
- ${narrow
- ? html` ${item.entity_id}
`
- : ""}
- `,
+ template: (name, item: any) => html`
+ ${name}
+ ${narrow
+ ? html` ${item.entity_id}
`
+ : ""}
+ `,
},
};
if (!narrow) {
diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts
index 45292826bc..9248d0c805 100644
--- a/src/panels/config/integrations/ha-config-integration-page.ts
+++ b/src/panels/config/integrations/ha-config-integration-page.ts
@@ -410,22 +410,23 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
${discoveryFlows.map(
- (flow) => html`
- ${flow.localized_title}
-
- `
+ (flow) =>
+ html`
+ ${flow.localized_title}
+
+ `
)}
`
diff --git a/src/panels/config/integrations/ha-config-integrations-dashboard.ts b/src/panels/config/integrations/ha-config-integrations-dashboard.ts
index 2e60ec2935..77e7ab18fd 100644
--- a/src/panels/config/integrations/ha-config-integrations-dashboard.ts
+++ b/src/panels/config/integrations/ha-config-integrations-dashboard.ts
@@ -150,7 +150,7 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
): [
[string, ConfigEntryExtended[]][],
ConfigEntryExtended[],
- ConfigEntryExtended[]
+ ConfigEntryExtended[],
] => {
let filteredConfigEntries: ConfigEntryExtended[];
const ignored: ConfigEntryExtended[] = [];
diff --git a/src/panels/config/integrations/ha-domain-integrations.ts b/src/panels/config/integrations/ha-domain-integrations.ts
index 0a96aa0856..ed4fc8c160 100644
--- a/src/panels/config/integrations/ha-domain-integrations.ts
+++ b/src/panels/config/integrations/ha-domain-integrations.ts
@@ -44,29 +44,30 @@ class HaDomainIntegrations extends LitElement {
${this.hass.localize("ui.panel.config.integrations.discovered")}
${this.flowsInProgress.map(
- (flow) => html`
-
- ${localizeConfigFlowTitle(this.hass.localize, flow)}
+ html`
-
- `
+
+ ${localizeConfigFlowTitle(this.hass.localize, flow)}
+
+ `
)}
${this.integration &&
diff --git a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts
index 6fe1e65f6b..13b2f85c66 100644
--- a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts
+++ b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts
@@ -223,25 +223,26 @@ class ZHAConfigDashboard extends LitElement {
${this._configuration
? Object.entries(this._configuration.schemas).map(
- ([section, schema]) => html`
-
-
-
- `
+ ([section, schema]) =>
+ html`
+
+
+
+ `
)
: ""}
diff --git a/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts
index 0b756fe41d..b57fbcf6ea 100644
--- a/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts
+++ b/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts
@@ -94,8 +94,9 @@ export class ZHAGroupsDashboard extends LitElement {
title: this.hass.localize("ui.panel.config.zha.groups.group_id"),
type: "numeric",
width: "15%",
- template: (groupId: number) =>
- html` ${formatAsPaddedHex(groupId)} `,
+ template: (groupId: number) => html`
+ ${formatAsPaddedHex(groupId)}
+ `,
sortable: true,
},
members: {
diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts
index d6a1b460a9..7ffc6554b2 100644
--- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts
+++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts
@@ -228,27 +228,28 @@ class DialogZWaveJSAddNode extends LitElement {
.sort()
.reverse()
.map(
- (securityClass) => html`${this.hass.localize(
- `ui.panel.config.zwave_js.security_classes.${SecurityClass[securityClass]}.title`
- )}
-
- ${this.hass.localize(
- `ui.panel.config.zwave_js.security_classes.${SecurityClass[securityClass]}.description`
- )}
-
`}
- >
-
+ html`${this.hass.localize(
+ `ui.panel.config.zwave_js.security_classes.${SecurityClass[securityClass]}.title`
+ )}
+
+ ${this.hass.localize(
+ `ui.panel.config.zwave_js.security_classes.${SecurityClass[securityClass]}.description`
+ )}
+
`}
>
-
- `
+
+
+ `
)}
html`
-
- ${this.hass.localize(
- "ui.panel.config.zwave_js.node_config.endpoint",
- "endpoint",
- endpoint
- )}
-
-
- ${configParamEntries
- .sort(([_, paramA], [__, paramB]) =>
- paramA.property !== paramB.property
- ? paramA.property - paramB.property
- : paramA.property_key! - paramB.property_key!
- )
- .map(
- ([id, item]) => html`
- ${this._generateConfigBox(id, item)}
- `
+ ([endpoint, configParamEntries]) =>
+ html`
+
+ ${this.hass.localize(
+ "ui.panel.config.zwave_js.node_config.endpoint",
+ "endpoint",
+ endpoint
)}
-
-
`
+
+
+ ${configParamEntries
+ .sort(([_, paramA], [__, paramB]) =>
+ paramA.property !== paramB.property
+ ? paramA.property - paramB.property
+ : paramA.property_key! - paramB.property_key!
+ )
+ .map(
+ ([id, item]) =>
+ html`
+ ${this._generateConfigBox(id, item)}
+ `
+ )}
+
+ `
)}
diff --git a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts
index 3430181210..7af4aa2587 100644
--- a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts
+++ b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts
@@ -123,12 +123,11 @@ export class HaConfigLovelaceDashboards extends LitElement {
sortable: true,
filterable: true,
width: "20%",
- template: (mode) =>
- html`
- ${this.hass.localize(
- `ui.panel.config.lovelace.dashboards.conf_mode.${mode}`
- ) || mode}
- `,
+ template: (mode) => html`
+ ${this.hass.localize(
+ `ui.panel.config.lovelace.dashboards.conf_mode.${mode}`
+ ) || mode}
+ `,
};
if (dashboards.some((dashboard) => dashboard.filename)) {
columns.filename = {
diff --git a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts
index 411d288fbe..1d9cc10c8c 100644
--- a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts
+++ b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts
@@ -58,12 +58,11 @@ export class HaConfigLovelaceRescources extends LitElement {
sortable: true,
filterable: true,
width: "30%",
- template: (type) =>
- html`
- ${this.hass.localize(
- `ui.panel.config.lovelace.resources.types.${type}`
- ) || type}
- `,
+ template: (type) => html`
+ ${this.hass.localize(
+ `ui.panel.config.lovelace.resources.types.${type}`
+ ) || type}
+ `,
},
})
);
diff --git a/src/panels/config/network/supervisor-network.ts b/src/panels/config/network/supervisor-network.ts
index a2cd8ffe30..114649620d 100644
--- a/src/panels/config/network/supervisor-network.ts
+++ b/src/panels/config/network/supervisor-network.ts
@@ -139,25 +139,24 @@ export class HassioNetwork extends LitElement {
${this._accessPoints.accesspoints
.filter((ap) => ap.ssid)
.map(
- (ap) =>
- html`
-
- ${ap.ssid}
-
- ${ap.mac} -
- ${this.hass.localize(
- "ui.panel.config.network.supervisor.signal_strength"
- )}:
- ${ap.signal}
-
-
- `
+ (ap) => html`
+
+ ${ap.ssid}
+
+ ${ap.mac} -
+ ${this.hass.localize(
+ "ui.panel.config.network.supervisor.signal_strength"
+ )}:
+ ${ap.signal}
+
+
+ `
)}
`
diff --git a/src/panels/config/repairs/dialog-system-information.ts b/src/panels/config/repairs/dialog-system-information.ts
index bc3b1e0181..c96ac4c574 100644
--- a/src/panels/config/repairs/dialog-system-information.ts
+++ b/src/panels/config/repairs/dialog-system-information.ts
@@ -305,13 +305,11 @@ class DialogSystemInformation extends LitElement {
const sections: TemplateResult[] = [];
if (!this._systemInfo) {
- sections.push(
- html`
-
-
-
- `
- );
+ sections.push(html`
+
+
+
+ `);
} else {
const domains = Object.keys(this._systemInfo).sort(sortKeys);
for (const domain of domains) {
@@ -371,24 +369,22 @@ class DialogSystemInformation extends LitElement {
`);
}
if (domain !== "homeassistant") {
- sections.push(
- html`
-
- `
- );
+ sections.push(html`
+
+ `);
}
sections.push(html`
diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts
index df9f6be040..3a7a7790b8 100644
--- a/src/panels/config/scene/ha-scene-dashboard.ts
+++ b/src/panels/config/scene/ha-scene-dashboard.ts
@@ -90,8 +90,9 @@ class HaSceneDashboard extends LitElement {
"ui.panel.config.scene.picker.headers.state"
),
type: "icon",
- template: (_, scene) =>
- html` `,
+ template: (_, scene) => html`
+
+ `,
},
name: {
title: this.hass.localize(
@@ -151,50 +152,49 @@ class HaSceneDashboard extends LitElement {
title: "",
width: "72px",
type: "overflow-menu",
- template: (_: string, scene: any) =>
- html`
- this._showInfo(scene),
- },
- {
- path: mdiPlay,
- label: this.hass.localize(
- "ui.panel.config.scene.picker.activate"
- ),
- action: () => this._activateScene(scene),
- },
- {
- divider: true,
- },
- {
- path: mdiContentDuplicate,
- label: this.hass.localize(
- "ui.panel.config.scene.picker.duplicate"
- ),
- action: () => this._duplicate(scene),
- disabled: !scene.attributes.id,
- },
- {
- label: this.hass.localize(
- "ui.panel.config.scene.picker.delete"
- ),
- path: mdiDelete,
- action: () => this._deleteConfirm(scene),
- warning: scene.attributes.id,
- disabled: !scene.attributes.id,
- },
- ]}
- >
-
- `,
+ template: (_: string, scene: any) => html`
+ this._showInfo(scene),
+ },
+ {
+ path: mdiPlay,
+ label: this.hass.localize(
+ "ui.panel.config.scene.picker.activate"
+ ),
+ action: () => this._activateScene(scene),
+ },
+ {
+ divider: true,
+ },
+ {
+ path: mdiContentDuplicate,
+ label: this.hass.localize(
+ "ui.panel.config.scene.picker.duplicate"
+ ),
+ action: () => this._duplicate(scene),
+ disabled: !scene.attributes.id,
+ },
+ {
+ label: this.hass.localize(
+ "ui.panel.config.scene.picker.delete"
+ ),
+ path: mdiDelete,
+ action: () => this._deleteConfirm(scene),
+ warning: scene.attributes.id,
+ disabled: !scene.attributes.id,
+ },
+ ]}
+ >
+
+ `,
};
return columns;
diff --git a/src/panels/config/scene/ha-scene-editor.ts b/src/panels/config/scene/ha-scene-editor.ts
index 4a93bb65e7..ffb3b25c42 100644
--- a/src/panels/config/scene/ha-scene-editor.ts
+++ b/src/panels/config/scene/ha-scene-editor.ts
@@ -324,43 +324,42 @@ export class HaSceneEditor extends SubscribeMixin(
${devices.map(
- (device) =>
- html`
-
-
- ${device.entities.map((entityId) => {
- const entityStateObj = this.hass.states[entityId];
- if (!entityStateObj) {
- return nothing;
- }
- return html`
-
-
-
- ${computeStateName(entityStateObj)}
-
-
- `;
- })}
-
- `
+ (device) => html`
+
+
+ ${device.entities.map((entityId) => {
+ const entityStateObj = this.hass.states[entityId];
+ if (!entityStateObj) {
+ return nothing;
+ }
+ return html`
+
+
+
+ ${computeStateName(entityStateObj)}
+
+
+ `;
+ })}
+
+ `
)}
- html`
- this._showInfo(script),
- },
- {
- path: mdiPlay,
- label: this.hass.localize("ui.panel.config.script.picker.run"),
- action: () => this._runScript(script),
- },
- {
- path: mdiTransitConnection,
- label: this.hass.localize(
- "ui.panel.config.script.picker.show_trace"
- ),
- action: () => this._showTrace(script),
- },
- {
- divider: true,
- },
- {
- path: mdiContentDuplicate,
- label: this.hass.localize(
- "ui.panel.config.script.picker.duplicate"
- ),
- action: () => this._duplicate(script),
- },
- {
- label: this.hass.localize(
- "ui.panel.config.script.picker.delete"
- ),
- path: mdiDelete,
- action: () => this._deleteConfirm(script),
- warning: true,
- },
- ]}
- >
-
- `,
+ template: (_: string, script: any) => html`
+ this._showInfo(script),
+ },
+ {
+ path: mdiPlay,
+ label: this.hass.localize("ui.panel.config.script.picker.run"),
+ action: () => this._runScript(script),
+ },
+ {
+ path: mdiTransitConnection,
+ label: this.hass.localize(
+ "ui.panel.config.script.picker.show_trace"
+ ),
+ action: () => this._showTrace(script),
+ },
+ {
+ divider: true,
+ },
+ {
+ path: mdiContentDuplicate,
+ label: this.hass.localize(
+ "ui.panel.config.script.picker.duplicate"
+ ),
+ action: () => this._duplicate(script),
+ },
+ {
+ label: this.hass.localize("ui.panel.config.script.picker.delete"),
+ path: mdiDelete,
+ action: () => this._deleteConfirm(script),
+ warning: true,
+ },
+ ]}
+ >
+
+ `,
};
return columns;
diff --git a/src/panels/config/tags/ha-config-tags.ts b/src/panels/config/tags/ha-config-tags.ts
index e566aff75d..61a61c8af7 100644
--- a/src/panels/config/tags/ha-config-tags.ts
+++ b/src/panels/config/tags/ha-config-tags.ts
@@ -70,18 +70,19 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
sortable: true,
filterable: true,
grows: true,
- template: (name, tag: any) => html`${name}
- ${narrow
- ? html`
- ${tag.last_scanned_datetime
- ? html``
- : this.hass.localize("ui.panel.config.tag.never_scanned")}
-
`
- : ""}`,
+ template: (name, tag: any) =>
+ html`${name}
+ ${narrow
+ ? html`
+ ${tag.last_scanned_datetime
+ ? html``
+ : this.hass.localize("ui.panel.config.tag.never_scanned")}
+
`
+ : ""}`,
},
};
if (!narrow) {
@@ -106,33 +107,38 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
title: "",
label: this.hass.localize("ui.panel.config.tag.headers.write"),
type: "icon-button",
- template: (_write, tag: any) => html` `,
+ template: (_write, tag: any) =>
+ html` `,
};
}
columns.automation = {
title: "",
type: "icon-button",
- template: (_automation, tag: any) => html` `,
+ template: (_automation, tag: any) =>
+ html` `,
};
columns.edit = {
title: "",
type: "icon-button",
- template: (_settings, tag: any) => html` `,
+ template: (_settings, tag: any) =>
+ html` `,
};
return columns;
}
diff --git a/src/panels/config/users/ha-config-users.ts b/src/panels/config/users/ha-config-users.ts
index 54c949f7d7..a125ef8b81 100644
--- a/src/panels/config/users/ha-config-users.ts
+++ b/src/panels/config/users/ha-config-users.ts
@@ -77,8 +77,9 @@ export class HaConfigUsers extends LitElement {
width: "20%",
direction: "asc",
hidden: narrow,
- template: (groupIds: User["group_ids"]) =>
- html` ${localize(`groups.${groupIds[0]}`)} `,
+ template: (groupIds: User["group_ids"]) => html`
+ ${localize(`groups.${groupIds[0]}`)}
+ `,
},
is_active: {
title: this.hass.localize(
diff --git a/src/panels/config/voice-assistants/debug/assist-render-pipeline-run.ts b/src/panels/config/voice-assistants/debug/assist-render-pipeline-run.ts
index f30d5cf5d7..14da1d1e7d 100644
--- a/src/panels/config/voice-assistants/debug/assist-render-pipeline-run.ts
+++ b/src/panels/config/voice-assistants/debug/assist-render-pipeline-run.ts
@@ -101,13 +101,12 @@ const renderProgress = (
const renderData = (data: Record, keys: Record) =>
Object.entries(keys).map(
- ([key, label]) =>
- html`
-
-
${label}
-
${data[key]}
-
- `
+ ([key, label]) => html`
+
+
${label}
+
${data[key]}
+
+ `
);
const dataMinusKeysRender = (
diff --git a/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts b/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts
index 98363e9bed..e6f171f367 100644
--- a/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts
+++ b/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts
@@ -150,11 +150,10 @@ export class VoiceAssistantsExpose extends LitElement {
filterable: true,
direction: "asc",
grows: true,
- template: (name, entry) =>
- html`
- ${name}
- ${entry.entity_id}
- `,
+ template: (name, entry) => html`
+ ${name}
+ ${entry.entity_id}
+ `,
},
area: {
title: this.hass.localize(
diff --git a/src/panels/developer-tools/event/event-subscribe-card.ts b/src/panels/developer-tools/event/event-subscribe-card.ts
index d1d7afc0aa..d6fc035474 100644
--- a/src/panels/developer-tools/event/event-subscribe-card.ts
+++ b/src/panels/developer-tools/event/event-subscribe-card.ts
@@ -70,25 +70,24 @@ class EventSubscribeCard extends LitElement {
${repeat(
this._events,
(event) => event.id,
- (event) =>
- html`
-
- ${this.hass!.localize(
- "ui.panel.developer-tools.tabs.events.event_fired",
- "name",
- event.id
- )}
- ${formatTime(
- new Date(event.event.time_fired),
- this.hass!.locale,
- this.hass!.config
- )}:
-
-
- `
+ (event) => html`
+
+ ${this.hass!.localize(
+ "ui.panel.developer-tools.tabs.events.event_fired",
+ "name",
+ event.id
+ )}
+ ${formatTime(
+ new Date(event.event.time_fired),
+ this.hass!.locale,
+ this.hass!.config
+ )}:
+
+
+ `
)}
diff --git a/src/panels/developer-tools/service/developer-tools-service.ts b/src/panels/developer-tools/service/developer-tools-service.ts
index 66da2d5f0e..d0600df766 100644
--- a/src/panels/developer-tools/service/developer-tools-service.ts
+++ b/src/panels/developer-tools/service/developer-tools-service.ts
@@ -66,8 +66,8 @@ class HaPanelDevService extends LitElement {
data: {},
};
if (this._yamlMode) {
- this.updateComplete.then(() =>
- this._yamlEditor?.setValue(this._serviceData)
+ this.updateComplete.then(
+ () => this._yamlEditor?.setValue(this._serviceData)
);
}
} else if (!this._serviceData?.service) {
@@ -79,8 +79,8 @@ class HaPanelDevService extends LitElement {
data: {},
};
if (this._yamlMode) {
- this.updateComplete.then(() =>
- this._yamlEditor?.setValue(this._serviceData)
+ this.updateComplete.then(
+ () => this._yamlEditor?.setValue(this._serviceData)
);
}
}
@@ -248,11 +248,12 @@ class HaPanelDevService extends LitElement {
? fields
: this._filterSelectorFields(fields)
).map(
- (field) => html`
- ${field.key} |
- ${field.description} |
- ${field.example} |
-
`
+ (field) =>
+ html`
+ ${field.key} |
+ ${field.description} |
+ ${field.example} |
+
`
)}
${this._yamlMode
diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts
index fe0a0c158c..c7618b38d5 100644
--- a/src/panels/developer-tools/template/developer-tools-template.ts
+++ b/src/panels/developer-tools/template/developer-tools-template.ts
@@ -202,30 +202,28 @@ class HaPanelDevTemplate extends LitElement {
${this._templateResult.listeners.domains
.sort()
.map(
- (domain) =>
- html`
-
- ${this.hass.localize(
- "ui.panel.developer-tools.tabs.templates.domain"
- )}: ${domain}
-
- `
+ (domain) => html`
+
+ ${this.hass.localize(
+ "ui.panel.developer-tools.tabs.templates.domain"
+ )}: ${domain}
+
+ `
)}
${this._templateResult.listeners.entities
.sort()
.map(
- (entity_id) =>
- html`
-
- ${this.hass.localize(
- "ui.panel.developer-tools.tabs.templates.entity"
- )}: ${entity_id}
-
- `
+ (entity_id) => html`
+
+ ${this.hass.localize(
+ "ui.panel.developer-tools.tabs.templates.entity"
+ )}: ${entity_id}
+
+ `
)}
`
diff --git a/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts b/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts
index 8b67a7e7a5..50bc2e2d60 100644
--- a/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts
+++ b/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts
@@ -142,24 +142,23 @@ export class DeveloperYamlConfig extends LitElement {
${this._reloadableDomains.map(
- (domain) =>
- html`
-
- ${this.hass.localize(
- `ui.panel.developer-tools.tabs.yaml.section.reloading.${domain}`
- ) ||
- this.hass.localize(
- "ui.panel.developer-tools.tabs.yaml.section.reloading.reload",
- "domain",
- domainToName(this.hass.localize, domain)
- )}
-
-
- `
+ (domain) => html`
+
+ ${this.hass.localize(
+ `ui.panel.developer-tools.tabs.yaml.section.reloading.${domain}`
+ ) ||
+ this.hass.localize(
+ "ui.panel.developer-tools.tabs.yaml.section.reloading.reload",
+ "domain",
+ domainToName(this.hass.localize, domain)
+ )}
+
+
+ `
)}
diff --git a/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts b/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts
index 378f6e7a5f..e621bdea72 100644
--- a/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts
+++ b/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts
@@ -446,8 +446,8 @@ class HuiEnergyDistrubutionCard
cy="40"
r="38"
stroke-dasharray="${homeSolarCircumference} ${
- CIRCLE_CIRCUMFERENCE - homeSolarCircumference
- }"
+ CIRCLE_CIRCUMFERENCE - homeSolarCircumference
+ }"
shape-rendering="geometricPrecision"
stroke-dashoffset="-${
CIRCLE_CIRCUMFERENCE - homeSolarCircumference
@@ -461,8 +461,8 @@ class HuiEnergyDistrubutionCard
cy="40"
r="38"
stroke-dasharray="${homeBatteryCircumference} ${
- CIRCLE_CIRCUMFERENCE - homeBatteryCircumference
- }"
+ CIRCLE_CIRCUMFERENCE - homeBatteryCircumference
+ }"
stroke-dashoffset="-${
CIRCLE_CIRCUMFERENCE -
homeBatteryCircumference -
@@ -478,8 +478,8 @@ class HuiEnergyDistrubutionCard
cy="40"
r="38"
stroke-dasharray="${homeLowCarbonCircumference} ${
- CIRCLE_CIRCUMFERENCE - homeLowCarbonCircumference
- }"
+ CIRCLE_CIRCUMFERENCE - homeLowCarbonCircumference
+ }"
stroke-dashoffset="-${
CIRCLE_CIRCUMFERENCE -
homeLowCarbonCircumference -
@@ -611,8 +611,8 @@ class HuiEnergyDistrubutionCard
id="return"
class="return"
d="M${hasBattery ? 45 : 47},0 v15 c0,${
- hasBattery ? "35 -10,30 -30,30" : "40 -10,35 -30,35"
- } h-20"
+ hasBattery ? "35 -10,30 -30,30" : "40 -10,35 -30,35"
+ } h-20"
vector-effect="non-scaling-stroke"
> `
: ""}
@@ -621,8 +621,8 @@ class HuiEnergyDistrubutionCard
id="solar"
class="solar"
d="M${hasBattery ? 55 : 53},0 v15 c0,${
- hasBattery ? "35 10,30 30,30" : "40 10,35 30,35"
- } h20"
+ hasBattery ? "35 10,30 30,30" : "40 10,35 30,35"
+ } h20"
vector-effect="non-scaling-stroke"
>`
: ""}
@@ -1024,7 +1024,9 @@ class HuiEnergyDistrubutionCard
}
.circle svg circle {
animation: rotate-in 0.6s ease-in;
- transition: stroke-dashoffset 0.4s, stroke-dasharray 0.4s;
+ transition:
+ stroke-dashoffset 0.4s,
+ stroke-dasharray 0.4s;
fill: none;
}
@keyframes rotate-in {
diff --git a/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts b/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts
index a6570a4485..734a4067ae 100644
--- a/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts
+++ b/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts
@@ -452,217 +452,220 @@ export class HuiEnergySourcesTableCard
`
: ""}
${types.grid?.map(
- (source) => html`${source.flow_from.map((flow, idx) => {
- const energy =
- calculateStatisticSumGrowth(
- this._data!.stats[flow.stat_energy_from]
- ) || 0;
- totalGrid += energy;
-
- const compareEnergy =
- (compare &&
+ (source) =>
+ html`${source.flow_from.map((flow, idx) => {
+ const energy =
calculateStatisticSumGrowth(
- this._data!.statsCompare[flow.stat_energy_from]
- )) ||
- 0;
- totalGridCompare += compareEnergy;
+ this._data!.stats[flow.stat_energy_from]
+ ) || 0;
+ totalGrid += energy;
- const cost_stat =
- flow.stat_cost ||
- this._data!.info.cost_sensors[flow.stat_energy_from];
- const cost = cost_stat
- ? calculateStatisticSumGrowth(
- this._data!.stats[cost_stat]
- ) || 0
- : null;
- if (cost !== null) {
- totalGridCost += cost;
- }
+ const compareEnergy =
+ (compare &&
+ calculateStatisticSumGrowth(
+ this._data!.statsCompare[flow.stat_energy_from]
+ )) ||
+ 0;
+ totalGridCompare += compareEnergy;
- const costCompare =
- compare && cost_stat
+ const cost_stat =
+ flow.stat_cost ||
+ this._data!.info.cost_sensors[flow.stat_energy_from];
+ const cost = cost_stat
? calculateStatisticSumGrowth(
- this._data!.statsCompare[cost_stat]
+ this._data!.stats[cost_stat]
) || 0
: null;
- if (costCompare !== null) {
- totalGridCostCompare += costCompare;
- }
+ if (cost !== null) {
+ totalGridCost += cost;
+ }
- const modifiedColor =
- idx > 0
- ? this.hass.themes.darkMode
- ? labBrighten(rgb2lab(hex2rgb(consumptionColor)), idx)
- : labDarken(rgb2lab(hex2rgb(consumptionColor)), idx)
- : undefined;
- const color = modifiedColor
- ? rgb2hex(lab2rgb(modifiedColor))
- : consumptionColor;
+ const costCompare =
+ compare && cost_stat
+ ? calculateStatisticSumGrowth(
+ this._data!.statsCompare[cost_stat]
+ ) || 0
+ : null;
+ if (costCompare !== null) {
+ totalGridCostCompare += costCompare;
+ }
- return html`
-
-
- |
-
- ${getStatisticLabel(
- this.hass,
- flow.stat_energy_from,
- this._data?.statsMetadata[flow.stat_energy_from]
- )}
- |
- ${compare
- ? html` 0
+ ? this.hass.themes.darkMode
+ ? labBrighten(rgb2lab(hex2rgb(consumptionColor)), idx)
+ : labDarken(rgb2lab(hex2rgb(consumptionColor)), idx)
+ : undefined;
+ const color = modifiedColor
+ ? rgb2hex(lab2rgb(modifiedColor))
+ : consumptionColor;
+
+ return html` |
+
+
+ |
+
+ ${getStatisticLabel(
+ this.hass,
+ flow.stat_energy_from,
+ this._data?.statsMetadata[flow.stat_energy_from]
+ )}
+ |
+ ${compare
+ ? html`
+ ${formatNumber(compareEnergy, this.hass.locale)}
+ kWh
+ |
+ ${showCosts
+ ? html`
+ ${costCompare !== null
+ ? formatNumber(
+ costCompare,
+ this.hass.locale,
+ {
+ style: "currency",
+ currency: this.hass.config.currency!,
+ }
+ )
+ : ""}
+ | `
+ : ""}`
+ : ""}
+
+ ${formatNumber(energy, this.hass.locale)} kWh
+ |
+ ${showCosts
+ ? html`
- ${formatNumber(compareEnergy, this.hass.locale)} kWh
- |
- ${showCosts
- ? html`
- ${costCompare !== null
- ? formatNumber(
- costCompare,
- this.hass.locale,
- {
- style: "currency",
- currency: this.hass.config.currency!,
- }
- )
- : ""}
- | `
- : ""}`
- : ""}
-
- ${formatNumber(energy, this.hass.locale)} kWh
- |
- ${showCosts
- ? html`
- ${cost !== null
- ? formatNumber(cost, this.hass.locale, {
- style: "currency",
- currency: this.hass.config.currency!,
- })
- : ""}
- | `
- : ""}
-
`;
- })}
- ${source.flow_to.map((flow, idx) => {
- const energy =
- (calculateStatisticSumGrowth(
- this._data!.stats[flow.stat_energy_to]
- ) || 0) * -1;
- totalGrid += energy;
- const cost_stat =
- flow.stat_compensation ||
- this._data!.info.cost_sensors[flow.stat_energy_to];
- const cost = cost_stat
- ? (calculateStatisticSumGrowth(
- this._data!.stats[cost_stat]
- ) || 0) * -1
- : null;
- if (cost !== null) {
- totalGridCost += cost;
- }
-
- const energyCompare =
- ((compare &&
- calculateStatisticSumGrowth(
- this._data!.statsCompare[flow.stat_energy_to]
- )) ||
- 0) * -1;
- totalGridCompare += energyCompare;
-
- const costCompare =
- compare && cost_stat
+ ${cost !== null
+ ? formatNumber(cost, this.hass.locale, {
+ style: "currency",
+ currency: this.hass.config.currency!,
+ })
+ : ""}
+ `
+ : ""}
+ `;
+ })}
+ ${source.flow_to.map((flow, idx) => {
+ const energy =
+ (calculateStatisticSumGrowth(
+ this._data!.stats[flow.stat_energy_to]
+ ) || 0) * -1;
+ totalGrid += energy;
+ const cost_stat =
+ flow.stat_compensation ||
+ this._data!.info.cost_sensors[flow.stat_energy_to];
+ const cost = cost_stat
? (calculateStatisticSumGrowth(
- this._data!.statsCompare[cost_stat]
+ this._data!.stats[cost_stat]
) || 0) * -1
: null;
- if (costCompare !== null) {
- totalGridCostCompare += costCompare;
- }
+ if (cost !== null) {
+ totalGridCost += cost;
+ }
- const modifiedColor =
- idx > 0
- ? this.hass.themes.darkMode
- ? labBrighten(rgb2lab(hex2rgb(returnColor)), idx)
- : labDarken(rgb2lab(hex2rgb(returnColor)), idx)
- : undefined;
- const color = modifiedColor
- ? rgb2hex(lab2rgb(modifiedColor))
- : returnColor;
+ const energyCompare =
+ ((compare &&
+ calculateStatisticSumGrowth(
+ this._data!.statsCompare[flow.stat_energy_to]
+ )) ||
+ 0) * -1;
+ totalGridCompare += energyCompare;
- return html`
-
-
- |
-
- ${getStatisticLabel(
- this.hass,
- flow.stat_energy_to,
- this._data?.statsMetadata[flow.stat_energy_to]
- )}
- |
- ${compare
- ? html` 0
+ ? this.hass.themes.darkMode
+ ? labBrighten(rgb2lab(hex2rgb(returnColor)), idx)
+ : labDarken(rgb2lab(hex2rgb(returnColor)), idx)
+ : undefined;
+ const color = modifiedColor
+ ? rgb2hex(lab2rgb(modifiedColor))
+ : returnColor;
+
+ return html` |
+
+
+ |
+
+ ${getStatisticLabel(
+ this.hass,
+ flow.stat_energy_to,
+ this._data?.statsMetadata[flow.stat_energy_to]
+ )}
+ |
+ ${compare
+ ? html`
+ ${formatNumber(energyCompare, this.hass.locale)}
+ kWh
+ |
+ ${showCosts
+ ? html`
+ ${costCompare !== null
+ ? formatNumber(
+ costCompare,
+ this.hass.locale,
+ {
+ style: "currency",
+ currency: this.hass.config.currency!,
+ }
+ )
+ : ""}
+ | `
+ : ""}`
+ : ""}
+
+ ${formatNumber(energy, this.hass.locale)} kWh
+ |
+ ${showCosts
+ ? html`
- ${formatNumber(energyCompare, this.hass.locale)} kWh
- |
- ${showCosts
- ? html`
- ${costCompare !== null
- ? formatNumber(
- costCompare,
- this.hass.locale,
- {
- style: "currency",
- currency: this.hass.config.currency!,
- }
- )
- : ""}
- | `
- : ""}`
- : ""}
-
- ${formatNumber(energy, this.hass.locale)} kWh
- |
- ${showCosts
- ? html`
- ${cost !== null
- ? formatNumber(cost, this.hass.locale, {
- style: "currency",
- currency: this.hass.config.currency!,
- })
- : ""}
- | `
- : ""}
-
`;
- })}`
+ ${cost !== null
+ ? formatNumber(cost, this.hass.locale, {
+ style: "currency",
+ currency: this.hass.config.currency!,
+ })
+ : ""}
+ `
+ : ""}
+ `;
+ })}`
)}
${types.grid
? html`
diff --git a/src/panels/lovelace/cards/hui-media-control-card.ts b/src/panels/lovelace/cards/hui-media-control-card.ts
index aa8074d220..fcd449cdf0 100644
--- a/src/panels/lovelace/cards/hui-media-control-card.ts
+++ b/src/panels/lovelace/cards/hui-media-control-card.ts
@@ -609,7 +609,9 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
right: 0;
opacity: 1;
- transition: width 0.8s, opacity 0.8s linear 0.8s;
+ transition:
+ width 0.8s,
+ opacity 0.8s linear 0.8s;
}
.image {
@@ -621,8 +623,12 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
right: 0;
height: 100%;
opacity: 1;
- transition: width 0.8s, background-image 0.8s, background-color 0.8s,
- background-size 0.8s, opacity 0.8s linear 0.8s;
+ transition:
+ width 0.8s,
+ background-image 0.8s,
+ background-color 0.8s,
+ background-size 0.8s,
+ opacity 0.8s linear 0.8s;
}
.no-image .image {
@@ -640,13 +646,17 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
height: 100%;
background-image: url("/static/images/card_media_player_bg.png");
width: 50%;
- transition: opacity 0.8s, background-color 0.8s;
+ transition:
+ opacity 0.8s,
+ background-color 0.8s;
}
.off .image,
.off .color-gradient {
opacity: 0;
- transition: opacity 0s, width 0.8s;
+ transition:
+ opacity 0s,
+ width 0.8s;
width: 0;
}
diff --git a/src/panels/lovelace/cards/hui-shopping-list-card.ts b/src/panels/lovelace/cards/hui-shopping-list-card.ts
index 0a6b08d6d3..1b7dc10a56 100644
--- a/src/panels/lovelace/cards/hui-shopping-list-card.ts
+++ b/src/panels/lovelace/cards/hui-shopping-list-card.ts
@@ -147,10 +147,12 @@ class HuiShoppingListCard
${this._reordering
? html`
- ${guard([this._uncheckedItems, this._renderEmptySortable], () =>
- this._renderEmptySortable
- ? ""
- : this._renderItems(this._uncheckedItems!)
+ ${guard(
+ [this._uncheckedItems, this._renderEmptySortable],
+ () =>
+ this._renderEmptySortable
+ ? ""
+ : this._renderItems(this._uncheckedItems!)
)}
`
@@ -178,23 +180,22 @@ class HuiShoppingListCard
${repeat(
this._checkedItems!,
(item) => item.id,
- (item) =>
- html`
-
-
-
-
- `
+ (item) => html`
+
+
+
+
+ `
)}
`
: ""}
@@ -207,35 +208,34 @@ class HuiShoppingListCard
${repeat(
items,
(item) => item.id,
- (item) =>
- html`
-
-
-
- ${this._reordering
- ? html`
-
-
- `
- : ""}
-
- `
+ (item) => html`
+
+
+
+ ${this._reordering
+ ? html`
+
+
+ `
+ : ""}
+
+ `
)}
`;
}
diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts
index 3471b6348b..f9b10c65a9 100644
--- a/src/panels/lovelace/cards/hui-tile-card.ts
+++ b/src/panels/lovelace/cards/hui-tile-card.ts
@@ -453,7 +453,9 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
height: 100%;
z-index: 0;
overflow: hidden;
- transition: box-shadow 180ms ease-in-out, border-color 180ms ease-in-out;
+ transition:
+ box-shadow 180ms ease-in-out,
+ border-color 180ms ease-in-out;
}
ha-card.active {
--tile-color: var(--state-icon-color);
diff --git a/src/panels/lovelace/common/process-config-entities.ts b/src/panels/lovelace/common/process-config-entities.ts
index 1d4519ea5f..49ce41ad27 100644
--- a/src/panels/lovelace/common/process-config-entities.ts
+++ b/src/panels/lovelace/common/process-config-entities.ts
@@ -3,7 +3,7 @@ import { isValidEntityId } from "../../../common/entity/valid_entity_id";
import { EntityConfig, LovelaceRowConfig } from "../entity-rows/types";
export const processConfigEntities = <
- T extends EntityConfig | LovelaceRowConfig
+ T extends EntityConfig | LovelaceRowConfig,
>(
entities: Array,
checkEntityId = true
diff --git a/src/panels/lovelace/components/hui-energy-period-selector.ts b/src/panels/lovelace/components/hui-energy-period-selector.ts
index 9cd6666cd3..dd923698ff 100644
--- a/src/panels/lovelace/components/hui-energy-period-selector.ts
+++ b/src/panels/lovelace/components/hui-energy-period-selector.ts
@@ -343,7 +343,9 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) {
opacity: 0;
pointer-events: none;
content: "";
- transition: opacity 15ms linear, background-color 15ms linear;
+ transition:
+ opacity 15ms linear,
+ background-color 15ms linear;
opacity: var(--mdc-icon-button-ripple-opacity, 0.12);
}
ha-icon-button.active::before {
diff --git a/src/panels/lovelace/create-element/create-element-base.ts b/src/panels/lovelace/create-element/create-element-base.ts
index 792b8fd2e3..a92d49ba8b 100644
--- a/src/panels/lovelace/create-element/create-element-base.ts
+++ b/src/panels/lovelace/create-element/create-element-base.ts
@@ -185,7 +185,7 @@ export const createLovelaceElement = (
};
export const tryCreateLovelaceElement = <
- T extends keyof CreateElementConfigTypes
+ T extends keyof CreateElementConfigTypes,
>(
tagSuffix: T,
config: CreateElementConfigTypes[T]["config"],
@@ -246,7 +246,7 @@ export const tryCreateLovelaceElement = <
};
export const getLovelaceElementClass = async <
- T extends keyof CreateElementConfigTypes
+ T extends keyof CreateElementConfigTypes,
>(
type: string,
tagSuffix: T,
diff --git a/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts
index 8cb52183c5..3ed3b6d8af 100644
--- a/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts
+++ b/src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts
@@ -246,10 +246,11 @@ export class HuiStatisticsGraphCardEditor
);
const configured_stat_types = this._config!.stat_types
? ensureArray(this._config.stat_types)
- : stat_types.filter((stat_type) =>
- this._metaDatas?.some((metaData) =>
- statisticsMetaHasType(metaData, stat_type)
- )
+ : stat_types.filter(
+ (stat_type) =>
+ this._metaDatas?.some((metaData) =>
+ statisticsMetaHasType(metaData, stat_type)
+ )
);
const data = {
chart_type: "line",
diff --git a/src/panels/lovelace/editor/header-footer-editor/hui-dialog-create-headerfooter.ts b/src/panels/lovelace/editor/header-footer-editor/hui-dialog-create-headerfooter.ts
index d1b5423e5e..092dd02134 100644
--- a/src/panels/lovelace/editor/header-footer-editor/hui-dialog-create-headerfooter.ts
+++ b/src/panels/lovelace/editor/header-footer-editor/hui-dialog-create-headerfooter.ts
@@ -56,26 +56,25 @@ export class HuiCreateDialogHeaderFooter
>
${headerFooterElements.map(
- (headerFooter, index) =>
- html`
-
-
-
- ${this.hass!.localize(
- `ui.panel.lovelace.editor.header-footer.types.${headerFooter.type}.name`
- )}
-
-
- `
+ (headerFooter, index) => html`
+
+
+
+ ${this.hass!.localize(
+ `ui.panel.lovelace.editor.header-footer.types.${headerFooter.type}.name`
+ )}
+
+
+ `
)}
diff --git a/src/panels/lovelace/entity-rows/hui-select-entity-row.ts b/src/panels/lovelace/entity-rows/hui-select-entity-row.ts
index 2d7d3c51e1..31b51927c1 100644
--- a/src/panels/lovelace/entity-rows/hui-select-entity-row.ts
+++ b/src/panels/lovelace/entity-rows/hui-select-entity-row.ts
@@ -75,19 +75,18 @@ class HuiSelectEntityRow extends LitElement implements LovelaceRow {
>
${stateObj.attributes.options
? stateObj.attributes.options.map(
- (option) =>
- html`
-
- ${computeStateDisplay(
- this.hass!.localize,
- stateObj,
- this.hass!.locale,
- this.hass!.config,
- this.hass!.entities,
- option
- )}
-
- `
+ (option) => html`
+
+ ${computeStateDisplay(
+ this.hass!.localize,
+ stateObj,
+ this.hass!.locale,
+ this.hass!.config,
+ this.hass!.entities,
+ option
+ )}
+
+ `
)
: ""}
diff --git a/src/panels/lovelace/strategies/get-strategy.ts b/src/panels/lovelace/strategies/get-strategy.ts
index 4e13f6ef36..59ae47b141 100644
--- a/src/panels/lovelace/strategies/get-strategy.ts
+++ b/src/panels/lovelace/strategies/get-strategy.ts
@@ -32,7 +32,7 @@ const strategies: Record<
};
const getLovelaceStrategy = async <
- T extends LovelaceDashboardStrategy | LovelaceViewStrategy
+ T extends LovelaceDashboardStrategy | LovelaceViewStrategy,
>(
strategyType: string
): Promise
=> {
diff --git a/src/panels/profile/ha-long-lived-access-tokens-card.ts b/src/panels/profile/ha-long-lived-access-tokens-card.ts
index 5edcbfb34d..c622ad0d7e 100644
--- a/src/panels/profile/ha-long-lived-access-tokens-card.ts
+++ b/src/panels/profile/ha-long-lived-access-tokens-card.ts
@@ -61,23 +61,27 @@ class HaLongLivedTokens extends LitElement {
)}
`
: accessTokens!.map(
- (token) => html`
- ${token.client_name}
-
- ${this.hass.localize(
- "ui.panel.profile.long_lived_access_tokens.created",
- "date",
- relativeTime(new Date(token.created_at), this.hass.locale)
- )}
-
-
- `
+ (token) =>
+ html`
+ ${token.client_name}
+
+ ${this.hass.localize(
+ "ui.panel.profile.long_lived_access_tokens.created",
+ "date",
+ relativeTime(
+ new Date(token.created_at),
+ this.hass.locale
+ )
+ )}
+
+
+ `
)}
diff --git a/src/panels/profile/ha-mfa-modules-card.ts b/src/panels/profile/ha-mfa-modules-card.ts
index c6fed2b149..ce3f94c0a2 100644
--- a/src/panels/profile/ha-mfa-modules-card.ts
+++ b/src/panels/profile/ha-mfa-modules-card.ts
@@ -17,21 +17,22 @@ class HaMfaModulesCard extends LitElement {
return html`
${this.mfaModules.map(
- (module) => html`
- ${module.name}
- ${module.id}
- ${module.enabled
- ? html`${this.hass.localize(
- "ui.panel.profile.mfa.disable"
- )}`
- : html`${this.hass.localize(
- "ui.panel.profile.mfa.enable"
- )}`}
- `
+ (module) =>
+ html`
+ ${module.name}
+ ${module.id}
+ ${module.enabled
+ ? html`${this.hass.localize(
+ "ui.panel.profile.mfa.disable"
+ )}`
+ : html`${this.hass.localize(
+ "ui.panel.profile.mfa.enable"
+ )}`}
+ `
)}
`;
diff --git a/src/panels/profile/ha-refresh-tokens-card.ts b/src/panels/profile/ha-refresh-tokens-card.ts
index b271002a63..6217936dcb 100644
--- a/src/panels/profile/ha-refresh-tokens-card.ts
+++ b/src/panels/profile/ha-refresh-tokens-card.ts
@@ -50,57 +50,61 @@ class HaRefreshTokens extends LitElement {
${this.hass.localize("ui.panel.profile.refresh_tokens.description")}
${refreshTokens?.length
? refreshTokens!.map(
- (token) => html`
- ${this.hass.localize(
- "ui.panel.profile.refresh_tokens.token_title",
- { clientId: token.client_id }
- )}
-
-
- ${this.hass.localize(
- "ui.panel.profile.refresh_tokens.created_at",
- {
- date: relativeTime(
- new Date(token.created_at),
- this.hass.locale
- ),
- }
- )}
-
-
- ${token.last_used_at
- ? this.hass.localize(
- "ui.panel.profile.refresh_tokens.last_used",
- {
- date: relativeTime(
- new Date(token.last_used_at),
- this.hass.locale
- ),
- location: token.last_used_ip,
- }
- )
- : this.hass.localize(
- "ui.panel.profile.refresh_tokens.not_used"
- )}
-
-
- ${token.is_current
- ? html`
- ${this.hass.localize(
- "ui.panel.profile.refresh_tokens.current_token_tooltip"
+ (token) =>
+ html`
+ ${this.hass.localize(
+ "ui.panel.profile.refresh_tokens.token_title",
+ { clientId: token.client_id }
+ )}
+
+
+ ${this.hass.localize(
+ "ui.panel.profile.refresh_tokens.created_at",
+ {
+ date: relativeTime(
+ new Date(token.created_at),
+ this.hass.locale
+ ),
+ }
+ )}
+
+
+ ${token.last_used_at
+ ? this.hass.localize(
+ "ui.panel.profile.refresh_tokens.last_used",
+ {
+ date: relativeTime(
+ new Date(token.last_used_at),
+ this.hass.locale
+ ),
+ location: token.last_used_ip,
+ }
+ )
+ : this.hass.localize(
+ "ui.panel.profile.refresh_tokens.not_used"
)}
- `
- : ""}
-
-
- `
+
+
+ ${token.is_current
+ ? html`
+ ${this.hass.localize(
+ "ui.panel.profile.refresh_tokens.current_token_tooltip"
+ )}
+ `
+ : ""}
+
+
+ `
)
: ""}
diff --git a/src/state-summary/state-card-select.ts b/src/state-summary/state-card-select.ts
index 354136c67e..4e6b48c9dc 100644
--- a/src/state-summary/state-card-select.ts
+++ b/src/state-summary/state-card-select.ts
@@ -29,19 +29,18 @@ class StateCardSelect extends LitElement {
@closed=${stopPropagation}
>
${this.stateObj.attributes.options.map(
- (option) =>
- html`
-
- ${computeStateDisplay(
- this.hass.localize,
- this.stateObj,
- this.hass.locale,
- this.hass.config,
- this.hass.entities,
- option
- )}
-
- `
+ (option) => html`
+
+ ${computeStateDisplay(
+ this.hass.localize,
+ this.stateObj,
+ this.hass.locale,
+ this.hass.config,
+ this.hass.entities,
+ option
+ )}
+
+ `
)}
`;
diff --git a/src/state/url-sync-mixin.ts b/src/state/url-sync-mixin.ts
index 387bf8fd9b..70b908feac 100644
--- a/src/state/url-sync-mixin.ts
+++ b/src/state/url-sync-mixin.ts
@@ -19,7 +19,7 @@ export let historyPromise: Promise | undefined;
let historyResolve: undefined | (() => void);
export const urlSyncMixin = <
- T extends Constructor
+ T extends Constructor,
>(
superClass: T
) =>
diff --git a/yarn.lock b/yarn.lock
index 77a5aaaa45..e4275e4f19 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9752,7 +9752,7 @@ __metadata:
object-hash: 3.0.0
open: 9.1.0
pinst: 3.0.0
- prettier: 2.8.8
+ prettier: 3.0.0
proxy-polyfill: 0.3.2
punycode: 2.3.0
qr-scanner: 1.4.2
@@ -13208,12 +13208,12 @@ __metadata:
languageName: node
linkType: hard
-"prettier@npm:2.8.8":
- version: 2.8.8
- resolution: "prettier@npm:2.8.8"
+"prettier@npm:3.0.0":
+ version: 3.0.0
+ resolution: "prettier@npm:3.0.0"
bin:
- prettier: bin-prettier.js
- checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8
+ prettier: bin/prettier.cjs
+ checksum: 6a832876a1552dc58330d2467874e5a0b46b9ccbfc5d3531eb69d15684743e7f83dc9fbd202db6270446deba9c82b79d24383d09924c462b457136a759425e33
languageName: node
linkType: hard