diff --git a/build-scripts/gulp/app.js b/build-scripts/gulp/app.js
index e21802d8d5..3b4343a495 100644
--- a/build-scripts/gulp/app.js
+++ b/build-scripts/gulp/app.js
@@ -30,8 +30,8 @@ gulp.task(
env.useWDS()
? "wds-watch-app"
: env.useRollup()
- ? "rollup-watch-app"
- : "webpack-watch-app"
+ ? "rollup-watch-app"
+ : "webpack-watch-app"
)
);
diff --git a/build-scripts/webpack.cjs b/build-scripts/webpack.cjs
index 17f65387a3..dfcaa54256 100644
--- a/build-scripts/webpack.cjs
+++ b/build-scripts/webpack.cjs
@@ -51,8 +51,8 @@ const createWebpackConfig = ({
devtool: isTestBuild
? false
: isProdBuild
- ? "nosources-source-map"
- : "eval-cheap-module-source-map",
+ ? "nosources-source-map"
+ : "eval-cheap-module-source-map",
entry,
node: false,
module: {
diff --git a/cast/src/launcher/layout/hc-cast.ts b/cast/src/launcher/layout/hc-cast.ts
index bdb15a3c9d..bc61a5cfd7 100644
--- a/cast/src/launcher/layout/hc-cast.ts
+++ b/cast/src/launcher/layout/hc-cast.ts
@@ -73,44 +73,44 @@ class HcCast extends LitElement {
${error
? html`
${this.castManager.status
? html`
diff --git a/cast/src/launcher/layout/hc-connect.ts b/cast/src/launcher/layout/hc-connect.ts
index 0173f99c3f..fa209cf9d6 100644
--- a/cast/src/launcher/layout/hc-connect.ts
+++ b/cast/src/launcher/layout/hc-connect.ts
@@ -33,13 +33,13 @@ const translateErr = (err) =>
err === ERR_CANNOT_CONNECT
? "Unable to connect"
: err === ERR_HASS_HOST_REQUIRED
- ? "Please enter a Home Assistant URL."
- : err === ERR_INVALID_HTTPS_TO_HTTP
- ? html`
- Cannot connect to Home Assistant instances over "http://".
- ${seeFAQ("https")}
- `
- : `Unknown error (${err}).`;
+ ? "Please enter a Home Assistant URL."
+ : err === ERR_INVALID_HTTPS_TO_HTTP
+ ? html`
+ Cannot connect to Home Assistant instances over "http://".
+ ${seeFAQ("https")}
+ `
+ : `Unknown error (${err}).`;
const INTRO = html`
diff --git a/demo/src/stubs/recorder.ts b/demo/src/stubs/recorder.ts
index 7cc9439ab0..14b3c348ed 100644
--- a/demo/src/stubs/recorder.ts
+++ b/demo/src/stubs/recorder.ts
@@ -43,8 +43,8 @@ const generateMeanStatistics = (
period === "day"
? addDays(currentDate, 1)
: period === "month"
- ? addMonths(currentDate, 1)
- : addHours(currentDate, 1);
+ ? addMonths(currentDate, 1)
+ : addHours(currentDate, 1);
}
return statistics;
};
@@ -80,8 +80,8 @@ const generateSumStatistics = (
period === "day"
? addDays(currentDate, 1)
: period === "month"
- ? addMonths(currentDate, 1)
- : addHours(currentDate, 1);
+ ? addMonths(currentDate, 1)
+ : addHours(currentDate, 1);
}
return statistics;
};
diff --git a/hassio/src/addon-store/hassio-addon-repository.ts b/hassio/src/addon-store/hassio-addon-repository.ts
index 728668ebd9..38cd480298 100644
--- a/hassio/src/addon-store/hassio-addon-repository.ts
+++ b/hassio/src/addon-store/hassio-addon-repository.ts
@@ -86,15 +86,15 @@ export class HassioAddonRepositoryEl extends LitElement {
)
: this.supervisor.localize("addon.state.installed")
: addon.available
- ? this.supervisor.localize("addon.state.not_installed")
- : this.supervisor.localize("addon.state.not_available")}
+ ? this.supervisor.localize("addon.state.not_installed")
+ : this.supervisor.localize("addon.state.not_available")}
.iconClass=${addon.installed
? addon.update_available
? "update"
: "installed"
: !addon.available
- ? "not_available"
- : ""}
+ ? "not_available"
+ : ""}
.iconImage=${atLeastVersion(
this.hass.config.version,
0,
@@ -108,8 +108,8 @@ export class HassioAddonRepositoryEl extends LitElement {
? "update"
: "installed"
: !addon.available
- ? "unavailable"
- : ""}
+ ? "unavailable"
+ : ""}
>
diff --git a/hassio/src/addon-view/config/hassio-addon-config.ts b/hassio/src/addon-view/config/hassio-addon-config.ts
index 59c0e3fc63..f73b13f374 100644
--- a/hassio/src/addon-view/config/hassio-addon-config.ts
+++ b/hassio/src/addon-view/config/hassio-addon-config.ts
@@ -104,50 +104,50 @@ class HassioAddonConfig extends LitElement {
selector: { select: { options: entry.options } },
}
: entry.type === "string"
- ? entry.multiple
- ? {
- name: entry.name,
- required: entry.required,
- selector: {
- select: { options: [], multiple: true, custom_value: true },
- },
- }
- : {
- name: entry.name,
- required: entry.required,
- selector: {
- text: {
- type:
- entry.format || MASKED_FIELDS.includes(entry.name)
- ? "password"
- : "text",
+ ? entry.multiple
+ ? {
+ name: entry.name,
+ required: entry.required,
+ selector: {
+ select: { options: [], multiple: true, custom_value: true },
},
- },
- }
- : entry.type === "boolean"
- ? {
- name: entry.name,
- required: entry.required,
- selector: { boolean: {} },
- }
- : entry.type === "schema"
- ? {
- name: entry.name,
- required: entry.required,
- selector: { object: {} },
- }
- : entry.type === "float" || entry.type === "integer"
- ? {
- name: entry.name,
- required: entry.required,
- selector: {
- number: {
- mode: "box",
- step: entry.type === "float" ? "any" : undefined,
- },
- },
- }
- : entry
+ }
+ : {
+ name: entry.name,
+ required: entry.required,
+ selector: {
+ text: {
+ type:
+ entry.format || MASKED_FIELDS.includes(entry.name)
+ ? "password"
+ : "text",
+ },
+ },
+ }
+ : entry.type === "boolean"
+ ? {
+ name: entry.name,
+ required: entry.required,
+ selector: { boolean: {} },
+ }
+ : entry.type === "schema"
+ ? {
+ name: entry.name,
+ required: entry.required,
+ selector: { object: {} },
+ }
+ : entry.type === "float" || entry.type === "integer"
+ ? {
+ name: entry.name,
+ required: entry.required,
+ selector: {
+ number: {
+ mode: "box",
+ step: entry.type === "float" ? "any" : undefined,
+ },
+ },
+ }
+ : entry
)
);
diff --git a/hassio/src/components/supervisor-formfield-label.ts b/hassio/src/components/supervisor-formfield-label.ts
index 70daf3dcc8..c6986c714b 100644
--- a/hassio/src/components/supervisor-formfield-label.ts
+++ b/hassio/src/components/supervisor-formfield-label.ts
@@ -17,8 +17,11 @@ class SupervisorFormfieldLabel extends LitElement {
${this.imageUrl
? html`
`
: this.supervisor.supervisor.channel === "stable"
- ? html`
-
- ${this.supervisor.localize(
- "system.supervisor.join_beta_action"
- )}
-
- `
- : ""}
+ ? html`
+
+ ${this.supervisor.localize(
+ "system.supervisor.join_beta_action"
+ )}
+
+ `
+ : ""}
${this.supervisor.supervisor.supported
diff --git a/hassio/src/update-available/update-available-card.ts b/hassio/src/update-available/update-available-card.ts
index c9fcb74d5e..7691368d43 100644
--- a/hassio/src/update-available/update-available-card.ts
+++ b/hassio/src/update-available/update-available-card.ts
@@ -70,8 +70,8 @@ const changelogUrl = (
return version.includes("dev")
? "https://github.com/home-assistant/core/commits/dev"
: version.includes("b")
- ? "https://next.home-assistant.io/latest-release-notes/"
- : "https://www.home-assistant.io/latest-release-notes/";
+ ? "https://next.home-assistant.io/latest-release-notes/"
+ : "https://www.home-assistant.io/latest-release-notes/";
}
if (entry === "os") {
return version.includes("dev")
@@ -141,44 +141,47 @@ class UpdateAvailableCard extends LitElement {
})}
`
: !this._updating
- ? html`
- ${this._changelogContent
- ? html`
-
-
-
-
- `
- : ""}
-
-
- ${this.supervisor.localize("update_available.description", {
+ ? html`
+ ${this._changelogContent
+ ? html`
+
+
+
+
+ `
+ : ""}
+
+
+ ${this.supervisor.localize(
+ "update_available.description",
+ {
+ name: this._name,
+ version: this._version,
+ newest_version: this._version_latest,
+ }
+ )}
+
+
+ ${["core", "addon"].includes(this._updateType)
+ ? html`
+
+
+
+ `
+ : ""}
+ `
+ : html`
+
+
+ ${this.supervisor.localize("update_available.updating", {
name: this._name,
- version: this._version,
- newest_version: this._version_latest,
+ version: this._version_latest,
})}
-
-
- ${["core", "addon"].includes(this._updateType)
- ? html`
-
-
-
- `
- : ""}
- `
- : html`
-
-
- ${this.supervisor.localize("update_available.updating", {
- name: this._name,
- version: this._version_latest,
- })}
-
`}
+ `}
${this._version !== this._version_latest && !this._updating
? html`
diff --git a/package.json b/package.json
index f2fd19e2ad..be5366ddeb 100644
--- a/package.json
+++ b/package.json
@@ -229,7 +229,7 @@
"object-hash": "3.0.0",
"open": "9.1.0",
"pinst": "3.0.0",
- "prettier": "3.0.3",
+ "prettier": "3.1.0",
"rollup": "2.79.1",
"rollup-plugin-string": "3.0.0",
"rollup-plugin-terser": "7.0.2",
diff --git a/src/auth/ha-auth-form-string.ts b/src/auth/ha-auth-form-string.ts
index aead80ac3e..a586f8cf4e 100644
--- a/src/auth/ha-auth-form-string.ts
+++ b/src/auth/ha-auth-form-string.ts
@@ -41,8 +41,8 @@ export class HaAuthFormString extends HaFormString {
!this.isPassword
? this.stringType
: this.unmaskedPassword
- ? "text"
- : "password"
+ ? "text"
+ : "password"
}
.label=${this.label}
.value=${this.data || ""}
diff --git a/src/common/config/can_show_page.ts b/src/common/config/can_show_page.ts
index 6cf9999340..0e4fdd0ecd 100644
--- a/src/common/config/can_show_page.ts
+++ b/src/common/config/can_show_page.ts
@@ -10,10 +10,10 @@ const isLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) =>
page.component
? isComponentLoaded(hass, page.component)
: page.components
- ? page.components.some((integration) =>
- isComponentLoaded(hass, integration)
- )
- : true;
+ ? page.components.some((integration) =>
+ isComponentLoaded(hass, integration)
+ )
+ : true;
const isCore = (page: PageNavigation) => page.core;
const isAdvancedPage = (page: PageNavigation) => page.advancedOnly;
const userWantsAdvanced = (hass: HomeAssistant) => hass.userData?.showAdvanced;
diff --git a/src/common/dom/get_main_window.ts b/src/common/dom/get_main_window.ts
index f97d2f7b76..a2a5cca7b1 100644
--- a/src/common/dom/get_main_window.ts
+++ b/src/common/dom/get_main_window.ts
@@ -4,5 +4,5 @@ export const mainWindow =
window.name === MAIN_WINDOW_NAME
? window
: parent.name === MAIN_WINDOW_NAME
- ? parent
- : top!;
+ ? parent
+ : top!;
diff --git a/src/common/entity/compute_state_display.ts b/src/common/entity/compute_state_display.ts
index 9d116117b5..2216a65ec3 100644
--- a/src/common/entity/compute_state_display.ts
+++ b/src/common/entity/compute_state_display.ts
@@ -225,8 +225,8 @@ export const computeStateDisplayFromEntityAttributes = (
: localize("ui.card.update.installing")
: attributes.latest_version
: attributes.skipped_version === attributes.latest_version
- ? attributes.latest_version ?? localize("state.default.unavailable")
- : localize("ui.card.update.up_to_date");
+ ? attributes.latest_version ?? localize("state.default.unavailable")
+ : localize("ui.card.update.up_to_date");
}
return (
diff --git a/src/common/entity/domain_icon.ts b/src/common/entity/domain_icon.ts
index 1ea45fa095..565358e9e4 100644
--- a/src/common/entity/domain_icon.ts
+++ b/src/common/entity/domain_icon.ts
@@ -100,8 +100,8 @@ export const domainIconWithoutDefault = (
return compareState === "unavailable"
? mdiRobotConfused
: compareState === "off"
- ? mdiRobotOff
- : mdiRobot;
+ ? mdiRobotOff
+ : mdiRobot;
case "binary_sensor":
return binarySensorIcon(compareState, stateObj);
diff --git a/src/components/buttons/ha-progress-button.ts b/src/components/buttons/ha-progress-button.ts
index 7b700895d7..1da70518fc 100644
--- a/src/components/buttons/ha-progress-button.ts
+++ b/src/components/buttons/ha-progress-button.ts
@@ -40,15 +40,15 @@ export class HaProgressButton extends LitElement {
${this._result === "success"
? html` `
: this._result === "error"
- ? html` `
- : this.progress
- ? html`
-
- `
- : ""}
+ ? html` `
+ : this.progress
+ ? html`
+
+ `
+ : ""}
`}
`;
diff --git a/src/components/chart/state-history-chart-timeline.ts b/src/components/chart/state-history-chart-timeline.ts
index 0330fcb1f8..d1c535e23c 100644
--- a/src/components/chart/state-history-chart-timeline.ts
+++ b/src/components/chart/state-history-chart-timeline.ts
@@ -161,8 +161,8 @@ export class StateHistoryChartTimeline extends LitElement {
const yWidth = this.showNames
? y.width ?? 0
: computeRTL(this.hass)
- ? 0
- : y.left ?? 0;
+ ? 0
+ : y.left ?? 0;
if (
this._yWidth !== Math.floor(yWidth) &&
y.ticks.length === this.data.length
diff --git a/src/components/chart/statistics-chart.ts b/src/components/chart/statistics-chart.ts
index 164637fc41..1914849be4 100644
--- a/src/components/chart/statistics-chart.ts
+++ b/src/components/chart/statistics-chart.ts
@@ -400,8 +400,8 @@ export class StatisticsChart extends LitElement {
? type === "min" && hasMean
? "+1"
: type === "max"
- ? "-1"
- : false
+ ? "-1"
+ : false
: false,
borderColor:
band && hasMean ? color + (this.hideLegend ? "00" : "7F") : color,
diff --git a/src/components/chart/timeline-chart/textbar-element.ts b/src/components/chart/timeline-chart/textbar-element.ts
index 9b766b0bb4..a9a26b1b40 100644
--- a/src/components/chart/timeline-chart/textbar-element.ts
+++ b/src/components/chart/timeline-chart/textbar-element.ts
@@ -40,8 +40,8 @@ export class TextBarElement extends BarElement {
(options?.backgroundColor === "transparent"
? "transparent"
: luminosity(hex2rgb(options.backgroundColor)) > 0.5
- ? "#000"
- : "#fff");
+ ? "#000"
+ : "#fff");
// ctx.font = "12px arial";
ctx.fillStyle = textColor;
diff --git a/src/components/entity/ha-state-label-badge.ts b/src/components/entity/ha-state-label-badge.ts
index b340893f06..f735452b6e 100644
--- a/src/components/entity/ha-state-label-badge.ts
+++ b/src/components/entity/ha-state-label-badge.ts
@@ -112,9 +112,9 @@ export class HaStateLabelBadge extends LitElement {
const image = this.icon
? ""
: this.image
- ? this.image
- : entityState.attributes.entity_picture_local ||
- entityState.attributes.entity_picture;
+ ? this.image
+ : entityState.attributes.entity_picture_local ||
+ entityState.attributes.entity_picture;
const value =
!image && !showIcon
? this._computeValue(domain, entityState, entry)
@@ -186,12 +186,12 @@ export class HaStateLabelBadge extends LitElement {
entityState.state === UNAVAILABLE
? "—"
: isNumericState(entityState)
- ? formatNumber(
- entityState.state,
- this.hass!.locale,
- getNumberFormatOptions(entityState, entry)
- )
- : this.hass!.formatEntityState(entityState);
+ ? formatNumber(
+ entityState.state,
+ this.hass!.locale,
+ getNumberFormatOptions(entityState, entry)
+ )
+ : this.hass!.formatEntityState(entityState);
}
}
diff --git a/src/components/ha-camera-stream.ts b/src/components/ha-camera-stream.ts
index 82c3b56d47..d17ca1f2c4 100644
--- a/src/components/ha-camera-stream.ts
+++ b/src/components/ha-camera-stream.ts
@@ -85,8 +85,8 @@ export class HaCameraStream extends LitElement {
.src=${__DEMO__
? this.stateObj.attributes.entity_picture!
: this._connected
- ? computeMJPEGStreamUrl(this.stateObj)
- : ""}
+ ? computeMJPEGStreamUrl(this.stateObj)
+ : ""}
.alt=${`Preview of the ${computeStateName(this.stateObj)} camera.`}
/>`;
}
diff --git a/src/components/ha-control-circular-slider.ts b/src/components/ha-control-circular-slider.ts
index af9a7cf469..fb2ef373d5 100644
--- a/src/components/ha-control-circular-slider.ts
+++ b/src/components/ha-control-circular-slider.ts
@@ -436,8 +436,8 @@ export class HaControlCircularSlider extends LitElement {
mode === "end"
? target <= current
: mode === "start"
- ? current <= target
- : false;
+ ? current <= target
+ : false;
const showTarget = value != null;
@@ -453,8 +453,8 @@ export class HaControlCircularSlider extends LitElement {
mode === "full"
? this._strokeDashArc(this.min, this.max)
: mode === "end"
- ? this._strokeDashArc(target, limit)
- : this._strokeDashArc(limit, target);
+ ? this._strokeDashArc(target, limit)
+ : this._strokeDashArc(limit, target);
const targetCircle = showTarget
? this._strokeCircleDashArc(target)
diff --git a/src/components/ha-control-select-menu.ts b/src/components/ha-control-select-menu.ts
index 04422d890e..78ffa238db 100644
--- a/src/components/ha-control-select-menu.ts
+++ b/src/components/ha-control-select-menu.ts
@@ -129,8 +129,8 @@ export class HaControlSelectMenu extends SelectBase {
${icon && "path" in icon
? html` `
: icon && "icon" in icon
- ? html` `
- : html` `}
+ ? html` `
+ : html` `}
`;
}
diff --git a/src/components/ha-control-select.ts b/src/components/ha-control-select.ts
index 04ff1f9f2c..91c740d0e5 100644
--- a/src/components/ha-control-select.ts
+++ b/src/components/ha-control-select.ts
@@ -184,8 +184,8 @@ export class HaControlSelect extends LitElement {
${option.path
? html` `
: option.icon
- ? html` `
- : nothing}
+ ? html` `
+ : nothing}
${option.label && !this.hideLabel
? html`${option.label} `
: nothing}
diff --git a/src/components/ha-control-switch.ts b/src/components/ha-control-switch.ts
index 759ee93f9d..ef2968b69a 100644
--- a/src/components/ha-control-switch.ts
+++ b/src/components/ha-control-switch.ts
@@ -147,8 +147,8 @@ export class HaControlSwitch extends LitElement {
? html` `
: html` `
: this.pathOff
- ? html` `
- : html` `}
+ ? html` `
+ : html` `}
`;
diff --git a/src/components/ha-file-upload.ts b/src/components/ha-file-upload.ts
index cc0e97a29c..2b741a1c19 100644
--- a/src/components/ha-file-upload.ts
+++ b/src/components/ha-file-upload.ts
@@ -112,40 +112,40 @@ export class HaFileUpload extends LitElement {
>
${this.supports} `
: typeof this.value === "string"
- ? html`
-
-
- ${this.value}
-
-
-
`
- : (this.value instanceof FileList
- ? Array.from(this.value)
- : ensureArray(this.value)
- ).map(
- (file) =>
- html`
-
-
- ${file.name} - ${bytesToString(file.size)}
-
-
-
`
- )}
+ ? html`
+
+
+ ${this.value}
+
+
+
`
+ : (this.value instanceof FileList
+ ? Array.from(this.value)
+ : ensureArray(this.value)
+ ).map(
+ (file) =>
+ html`
+
+
+ ${file.name} - ${bytesToString(file.size)}
+
+
+
`
+ )}
`
: this.schema.iconPath
- ? html` `
- : nothing}
+ ? html`
+
+ `
+ : nothing}
${this.schema.title}
diff --git a/src/components/ha-form/ha-form-string.ts b/src/components/ha-form/ha-form-string.ts
index c26fe6de26..ca9b7b9858 100644
--- a/src/components/ha-form/ha-form-string.ts
+++ b/src/components/ha-form/ha-form-string.ts
@@ -53,8 +53,8 @@ export class HaFormString extends LitElement implements HaFormElement {
.type=${!this.isPassword
? this.stringType
: this.unmaskedPassword
- ? "text"
- : "password"}
+ ? "text"
+ : "password"}
.label=${this.label}
.value=${this.data || ""}
.helper=${this.helper}
diff --git a/src/components/ha-form/ha-form.ts b/src/components/ha-form/ha-form.ts
index 68f34f7bd2..9fcc82aff6 100644
--- a/src/components/ha-form/ha-form.ts
+++ b/src/components/ha-form/ha-form.ts
@@ -115,12 +115,12 @@ export class HaForm extends LitElement implements HaFormElement {
`
: warning
- ? html`
-
- ${this._computeWarning(warning, item)}
-
- `
- : ""}
+ ? html`
+
+ ${this._computeWarning(warning, item)}
+
+ `
+ : ""}
${"selector" in item
? html`
`;
diff --git a/src/components/ha-icon-overflow-menu.ts b/src/components/ha-icon-overflow-menu.ts
index 8797dcb4c7..e8d48ea67e 100644
--- a/src/components/ha-icon-overflow-menu.ts
+++ b/src/components/ha-icon-overflow-menu.ts
@@ -71,23 +71,23 @@ export class HaIconOverflowMenu extends LitElement {
item.narrowOnly
? ""
: item.divider
- ? html`
`
- : html`
- ${item.tooltip
- ? html`
- ${item.tooltip}
- `
- : ""}
-
-
`
+ ? html`
`
+ : html`
+ ${item.tooltip
+ ? html`
+ ${item.tooltip}
+ `
+ : ""}
+
+
`
)}
`}
`;
diff --git a/src/components/ha-icon-picker.ts b/src/components/ha-icon-picker.ts
index b91016bb7a..786618cc40 100644
--- a/src/components/ha-icon-picker.ts
+++ b/src/components/ha-icon-picker.ts
@@ -120,11 +120,11 @@ export class HaIconPicker extends LitElement {
`
: this.fallbackPath
- ? html` `
- : ""}
+ ? html` `
+ : ""}
`;
}
diff --git a/src/components/ha-mount-picker.ts b/src/components/ha-mount-picker.ts
index 6a35dea416..786f4952be 100644
--- a/src/components/ha-mount-picker.ts
+++ b/src/components/ha-mount-picker.ts
@@ -96,8 +96,8 @@ class HaMountPicker extends LitElement {
.path=${mount.usage === SupervisorMountUsage.MEDIA
? mdiPlayBox
: mount.usage === SupervisorMountUsage.SHARE
- ? mdiFolder
- : mdiBackupRestore}
+ ? mdiFolder
+ : mdiBackupRestore}
>
`
)}
diff --git a/src/components/ha-selector/ha-selector-media.ts b/src/components/ha-selector/ha-selector-media.ts
index bd45f5dec1..e9149a6b1c 100644
--- a/src/components/ha-selector/ha-selector-media.ts
+++ b/src/components/ha-selector/ha-selector-media.ts
@@ -145,13 +145,13 @@ export class HaMediaSelector extends LitElement {
.path=${!this.value?.media_content_id
? mdiPlus
: this.value?.metadata?.media_class
- ? MediaClassBrowserSettings[
- this.value.metadata.media_class === "directory"
- ? this.value.metadata.children_media_class ||
- this.value.metadata.media_class
- : this.value.metadata.media_class
- ].icon
- : mdiPlayBox}
+ ? MediaClassBrowserSettings[
+ this.value.metadata.media_class === "directory"
+ ? this.value.metadata.children_media_class ||
+ this.value.metadata.media_class
+ : this.value.metadata.media_class
+ ].icon
+ : mdiPlayBox}
>
`}
diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts
index 5abd368056..a099b02d36 100644
--- a/src/components/ha-service-control.ts
+++ b/src/components/ha-service-control.ts
@@ -414,17 +414,17 @@ export class HaServiceControl extends LitElement {
>`
: entityId
- ? html` `
- : ""}
+ ? html` `
+ : ""}
${shouldRenderServiceDataYaml
? html``
: panel.url_path in PANEL_ICONS
- ? html` `
- : html` `}
+ ? html` `
+ : html` `}
${panel.url_path === this.hass.defaultPanel
? this.hass.localize("panel.states")
diff --git a/src/components/ha-target-picker.ts b/src/components/ha-target-picker.ts
index 08261c5793..549fa02320 100644
--- a/src/components/ha-target-picker.ts
+++ b/src/components/ha-target-picker.ts
@@ -303,40 +303,40 @@ export class HaTargetPicker extends LitElement {
>
`
: this._addMode === "device_id"
- ? html`
-
- `
- : html`
-
- `}
+ `
+ : html`
+
+ `}`;
}
diff --git a/src/components/media-player/dialog-media-manage.ts b/src/components/media-player/dialog-media-manage.ts
index 1481586382..6707cf03c0 100644
--- a/src/components/media-player/dialog-media-manage.ts
+++ b/src/components/media-player/dialog-media-manage.ts
@@ -151,54 +151,54 @@ class DialogMediaManage extends LitElement {
`
: !children.length
- ? html`
-
- ${this.hass.localize(
- "ui.components.media-browser.file_management.no_items"
- )}
-
- ${this._currentItem?.children?.length
- ? html`
${this.hass.localize(
- "ui.components.media-browser.file_management.folders_not_supported"
- )} `
- : ""}
-
`
- : html`
-
- ${repeat(
- children,
- (item) => item.media_content_id,
- (item) => {
- const icon = html`
-
- `;
- return html`
-
- ${icon} ${item.title}
-
- `;
- }
- )}
-
- `}
+ ? html`
+
+ ${this.hass.localize(
+ "ui.components.media-browser.file_management.no_items"
+ )}
+
+ ${this._currentItem?.children?.length
+ ? html`
${this.hass.localize(
+ "ui.components.media-browser.file_management.folders_not_supported"
+ )} `
+ : ""}
+
`
+ : html`
+
+ ${repeat(
+ children,
+ (item) => item.media_content_id,
+ (item) => {
+ const icon = html`
+
+ `;
+ return html`
+
+ ${icon} ${item.title}
+
+ `;
+ }
+ )}
+
+ `}
${isComponentLoaded(this.hass, "hassio")
? html`
${this.hass.localize(
diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts
index 525befc13d..fabad8b828 100644
--- a/src/components/media-player/ha-media-player-browse.ts
+++ b/src/components/media-player/ha-media-player-browse.ts
@@ -445,107 +445,109 @@ export class HaMediaPlayerBrowse extends LitElement {
`
: isTTSMediaSource(currentItem.media_content_id)
- ? html`
-
- `
- : !children.length && !currentItem.not_shown
- ? html`
-
- ${currentItem.media_content_id ===
- "media-source://media_source/local/."
- ? html`
-
-
-
-
-
- ${this.hass.localize(
- "ui.components.media-browser.file_management.highlight_button"
- )}
-
-
- `
- : this.hass.localize(
- "ui.components.media-browser.no_items"
- )}
-
- `
- : childrenMediaClass.layout === "grid"
- ? html`
-
- ${currentItem.not_shown
- ? html`
-
-
- ${this.hass.localize(
- "ui.components.media-browser.not_shown",
- { count: currentItem.not_shown }
+ ? html`
+
+ `
+ : !children.length && !currentItem.not_shown
+ ? html`
+
+ ${currentItem.media_content_id ===
+ "media-source://media_source/local/."
+ ? html`
+
+
+
+
+
+ ${this.hass.localize(
+ "ui.components.media-browser.file_management.highlight_button"
+ )}
+
+
+ `
+ : this.hass.localize(
+ "ui.components.media-browser.no_items"
)}
-
-
+
+ `
+ : childrenMediaClass.layout === "grid"
+ ? html`
+
+ ${currentItem.not_shown
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.components.media-browser.not_shown",
+ { count: currentItem.not_shown }
+ )}
+
+
+ `
+ : ""}
+ `
+ : html`
+
+
+ ${currentItem.not_shown
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.components.media-browser.not_shown",
+ { count: currentItem.not_shown }
+ )}
+
+
+ `
+ : ""}
+
`
- : ""}
- `
- : html`
-
-
- ${currentItem.not_shown
- ? html`
-
-
- ${this.hass.localize(
- "ui.components.media-browser.not_shown",
- { count: currentItem.not_shown }
- )}
-
-
- `
- : ""}
-
- `
}
diff --git a/src/components/trace/ha-trace-path-details.ts b/src/components/trace/ha-trace-path-details.ts
index fe963622f7..46f4a7a23e 100644
--- a/src/components/trace/ha-trace-path-details.ts
+++ b/src/components/trace/ha-trace-path-details.ts
@@ -62,8 +62,8 @@ export class HaTracePathDetails extends LitElement {
${this._view === "config"
? this._renderSelectedConfig()
: this._view === "changed_variables"
- ? this._renderChangedVars()
- : this._renderLogbook()}
+ ? this._renderChangedVars()
+ : this._renderLogbook()}
`;
}
@@ -134,8 +134,8 @@ export class HaTracePathDetails extends LitElement {
? html`Result:
${dump(result)} `
: error
- ? html`Error: ${error}
`
- : ""}
+ ? html`Error: ${error}
`
+ : ""}
${Object.keys(rest).length === 0
? ""
: html`${dump(rest)} `}
diff --git a/src/data/automation_i18n.ts b/src/data/automation_i18n.ts
index 3e6656d5d8..cfc22189fb 100644
--- a/src/data/automation_i18n.ts
+++ b/src/data/automation_i18n.ts
@@ -389,8 +389,8 @@ const tryDescribeTrigger = (
typeof at !== "string"
? at
: at.includes(".")
- ? `entity ${hass.states[at] ? computeStateName(hass.states[at]) : at}`
- : localizeTimeString(at, hass.locale, hass.config)
+ ? `entity ${hass.states[at] ? computeStateName(hass.states[at]) : at}`
+ : localizeTimeString(at, hass.locale, hass.config)
);
return hass.localize(`${triggerTranslationBaseKey}.time.description.full`, {
@@ -411,10 +411,10 @@ const tryDescribeTrigger = (
const seconds = seconds_all
? 0
: typeof trigger.seconds === "number"
- ? trigger.seconds
- : seconds_interval
- ? parseInt(trigger.seconds.substring(1))
- : parseInt(trigger.seconds);
+ ? trigger.seconds
+ : seconds_interval
+ ? parseInt(trigger.seconds.substring(1))
+ : parseInt(trigger.seconds);
if (
isNaN(seconds) ||
@@ -440,10 +440,10 @@ const tryDescribeTrigger = (
const minutes = minutes_all
? 0
: typeof trigger.minutes === "number"
- ? trigger.minutes
- : minutes_interval
- ? parseInt(trigger.minutes.substring(1))
- : parseInt(trigger.minutes);
+ ? trigger.minutes
+ : minutes_interval
+ ? parseInt(trigger.minutes.substring(1))
+ : parseInt(trigger.minutes);
if (
isNaN(minutes) ||
@@ -477,10 +477,10 @@ const tryDescribeTrigger = (
const hours = hours_all
? 0
: typeof trigger.hours === "number"
- ? trigger.hours
- : hours_interval
- ? parseInt(trigger.hours.substring(1))
- : parseInt(trigger.hours);
+ ? trigger.hours
+ : hours_interval
+ ? parseInt(trigger.hours.substring(1))
+ : parseInt(trigger.hours);
if (
isNaN(hours) ||
@@ -919,23 +919,23 @@ const tryDescribeCondition = (
typeof condition.before !== "string"
? condition.before
: condition.before.includes(".")
- ? `entity ${
- hass.states[condition.before]
- ? computeStateName(hass.states[condition.before])
- : condition.before
- }`
- : localizeTimeString(condition.before, hass.locale, hass.config);
+ ? `entity ${
+ hass.states[condition.before]
+ ? computeStateName(hass.states[condition.before])
+ : condition.before
+ }`
+ : localizeTimeString(condition.before, hass.locale, hass.config);
const after =
typeof condition.after !== "string"
? condition.after
: condition.after.includes(".")
- ? `entity ${
- hass.states[condition.after]
- ? computeStateName(hass.states[condition.after])
- : condition.after
- }`
- : localizeTimeString(condition.after, hass.locale, hass.config);
+ ? `entity ${
+ hass.states[condition.after]
+ ? computeStateName(hass.states[condition.after])
+ : condition.after
+ }`
+ : localizeTimeString(condition.after, hass.locale, hass.config);
let localizedDays: string[] = [];
if (validWeekdays) {
diff --git a/src/data/energy.ts b/src/data/energy.ts
index fbc89045a9..1da926bf0f 100644
--- a/src/data/energy.ts
+++ b/src/data/energy.ts
@@ -767,8 +767,8 @@ export const getEnergyGasUnit = (
return unitClass === "energy"
? "kWh"
: hass.config.unit_system.length === "km"
- ? "m³"
- : "ft³";
+ ? "m³"
+ : "ft³";
};
export const getEnergyWaterUnit = (hass: HomeAssistant): string | undefined =>
diff --git a/src/data/fan.ts b/src/data/fan.ts
index 11da23529c..5bcf32e758 100644
--- a/src/data/fan.ts
+++ b/src/data/fan.ts
@@ -89,8 +89,8 @@ export function computeFanSpeedIcon(
return speed === "on"
? mdiFan
: speed === "off"
- ? mdiFanOff
- : [mdiFanSpeed1, mdiFanSpeed2, mdiFanSpeed3][index - 1];
+ ? mdiFanOff
+ : [mdiFanSpeed1, mdiFanSpeed2, mdiFanSpeed3][index - 1];
}
export const FAN_SPEED_COUNT_MAX_FOR_BUTTONS = 4;
diff --git a/src/data/history.ts b/src/data/history.ts
index 89b15ef75a..708c8d97c8 100644
--- a/src/data/history.ts
+++ b/src/data/history.ts
@@ -377,8 +377,8 @@ const processLineChartEntities = (
entityId in hassEntities
? hassEntities[entityId].attributes
: "friendly_name" in first.a
- ? first.a
- : undefined;
+ ? first.a
+ : undefined;
data.push({
domain,
diff --git a/src/data/light.ts b/src/data/light.ts
index ed42fdeb5f..8c3cfb9a49 100644
--- a/src/data/light.ts
+++ b/src/data/light.ts
@@ -68,8 +68,8 @@ export const getLightCurrentModeRgbColor = (
entity.attributes.color_mode === LightColorMode.RGBWW
? entity.attributes.rgbww_color
: entity.attributes.color_mode === LightColorMode.RGBW
- ? entity.attributes.rgbw_color
- : entity.attributes.rgb_color;
+ ? entity.attributes.rgbw_color
+ : entity.attributes.rgb_color;
interface LightEntityAttributes extends HassEntityAttributeBase {
min_color_temp_kelvin?: number;
diff --git a/src/data/media-player.ts b/src/data/media-player.ts
index 0e3ca09160..65f34dba53 100644
--- a/src/data/media-player.ts
+++ b/src/data/media-player.ts
@@ -331,16 +331,16 @@ export const computeMediaControls = (
state === "on"
? mdiPlayPause
: state !== "playing"
- ? mdiPlay
- : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE)
- ? mdiPause
- : mdiStop,
+ ? mdiPlay
+ : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE)
+ ? mdiPause
+ : mdiStop,
action:
state !== "playing"
? "media_play"
: supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE)
- ? "media_pause"
- : "media_stop",
+ ? "media_pause"
+ : "media_stop",
});
}
@@ -394,8 +394,8 @@ export const computeMediaControls = (
stateAttr.repeat === "all"
? mdiRepeat
: stateAttr.repeat === "one"
- ? mdiRepeatOnce
- : mdiRepeatOff,
+ ? mdiRepeatOnce
+ : mdiRepeatOff,
action: "repeat_set",
});
}
@@ -459,18 +459,18 @@ export const handleMediaControlClick = (
shuffle: !stateObj!.attributes.shuffle,
}
: action === "repeat_set"
- ? {
- entity_id: stateObj!.entity_id,
- repeat:
- stateObj!.attributes.repeat === "all"
- ? "one"
- : stateObj!.attributes.repeat === "off"
- ? "all"
- : "off",
- }
- : {
- entity_id: stateObj!.entity_id,
- }
+ ? {
+ entity_id: stateObj!.entity_id,
+ repeat:
+ stateObj!.attributes.repeat === "all"
+ ? "one"
+ : stateObj!.attributes.repeat === "off"
+ ? "all"
+ : "off",
+ }
+ : {
+ entity_id: stateObj!.entity_id,
+ }
);
export const mediaPlayerPlayMedia = (
diff --git a/src/data/weather.ts b/src/data/weather.ts
index b23bfdd85d..abded90d6d 100644
--- a/src/data/weather.ts
+++ b/src/data/weather.ts
@@ -383,13 +383,13 @@ const getWeatherStateSVG = (
/>
`
: state === "partlycloudy"
- ? svg`
+ ? svg`
`
- : ""
+ : ""
}
${
cloudyStates.has(state)
@@ -524,8 +524,8 @@ export const weatherIcon = (state?: string, nightTime?: boolean): string =>
!state
? undefined
: nightTime && state === "partlycloudy"
- ? mdiWeatherNightPartlyCloudy
- : weatherIcons[state];
+ ? mdiWeatherNightPartlyCloudy
+ : weatherIcons[state];
const EIGHT_HOURS = 28800000;
const DAY_IN_MILLISECONDS = 86400000;
diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts
index f3ed4504aa..a4d48a4592 100644
--- a/src/dialogs/config-flow/dialog-data-entry-flow.ts
+++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts
@@ -227,107 +227,108 @@ class DataEntryFlowDialog extends LitElement {
>
`
: this._step === undefined
- ? // When we are going to next step, we render 1 round of empty
- // to reset the element.
- ""
- : html`
-
- ${([
- "form",
- "menu",
- "external",
- "progress",
- "data_entry_flow_progressed",
- ].includes(this._step?.type as any) &&
- this._params.manifest?.is_built_in) ||
- this._params.manifest?.documentation
- ? html`
-
-
+ ${([
+ "form",
+ "menu",
+ "external",
+ "progress",
+ "data_entry_flow_progressed",
+ ].includes(this._step?.type as any) &&
+ this._params.manifest?.is_built_in) ||
+ this._params.manifest?.documentation
+ ? html`
+
-
+
+
+ `
+ : ""}
+
+
+ ${this._step.type === "form"
+ ? html`
+
`
- : ""}
-
-
- ${this._step.type === "form"
- ? html`
-
- `
- : this._step.type === "external"
- ? html`
-
- `
- : this._step.type === "abort"
- ? html`
-
- `
- : this._step.type === "progress"
- ? html`
-
- `
- : this._step.type === "menu"
- ? html`
-
- `
- : this._devices === undefined || this._areas === undefined
- ? // When it's a create entry result, we will fetch device & area registry
- html`
-
- `
- : html`
-
- `}
- `}
+ : this._step.type === "external"
+ ? html`
+
+ `
+ : this._step.type === "abort"
+ ? html`
+
+ `
+ : this._step.type === "progress"
+ ? html`
+
+ `
+ : this._step.type === "menu"
+ ? html`
+
+ `
+ : this._devices === undefined ||
+ this._areas === undefined
+ ? // When it's a create entry result, we will fetch device & area registry
+ html`
+
+ `
+ : html`
+
+ `}
+ `}
`;
diff --git a/src/dialogs/config-flow/previews/flow-preview-template.ts b/src/dialogs/config-flow/previews/flow-preview-template.ts
index fd337671e3..19e7c6c998 100644
--- a/src/dialogs/config-flow/previews/flow-preview-template.ts
+++ b/src/dialogs/config-flow/previews/flow-preview-template.ts
@@ -66,56 +66,56 @@ class FlowPreviewTemplate extends LitElement {
${!this._listeners
? nothing
: this._listeners.all
- ? html`
-
- ${this.hass.localize(
- "ui.dialogs.helper_settings.template.all_listeners"
- )}
-
- `
- : this._listeners.domains.length || this._listeners.entities.length
- ? html`
-
- ${this.hass.localize(
- "ui.dialogs.helper_settings.template.listeners"
- )}
-
-
- ${this._listeners.domains
- .sort()
- .map(
- (domain) => html`
-
- ${this.hass.localize(
- "ui.dialogs.helper_settings.template.domain"
- )} : ${domain}
-
- `
+ ? html`
+
+ ${this.hass.localize(
+ "ui.dialogs.helper_settings.template.all_listeners"
)}
- ${this._listeners.entities
- .sort()
- .map(
- (entity_id) => html`
-
- ${this.hass.localize(
- "ui.dialogs.helper_settings.template.entity"
- )} : ${entity_id}
-
- `
- )}
-
- `
- : !this._listeners.time
- ? html`
- ${this.hass.localize(
- "ui.dialogs.helper_settings.template.no_listeners"
- )}
-
`
- : nothing} `;
+
+ `
+ : this._listeners.domains.length || this._listeners.entities.length
+ ? html`
+
+ ${this.hass.localize(
+ "ui.dialogs.helper_settings.template.listeners"
+ )}
+
+
+ ${this._listeners.domains
+ .sort()
+ .map(
+ (domain) => html`
+
+ ${this.hass.localize(
+ "ui.dialogs.helper_settings.template.domain"
+ )} : ${domain}
+
+ `
+ )}
+ ${this._listeners.entities
+ .sort()
+ .map(
+ (entity_id) => html`
+
+ ${this.hass.localize(
+ "ui.dialogs.helper_settings.template.entity"
+ )} : ${entity_id}
+
+ `
+ )}
+
+ `
+ : !this._listeners.time
+ ? html`
+ ${this.hass.localize(
+ "ui.dialogs.helper_settings.template.no_listeners"
+ )}
+
`
+ : nothing} `;
}
private _setPreview = (preview: TemplatePreview) => {
diff --git a/src/dialogs/enter-code/dialog-enter-code.ts b/src/dialogs/enter-code/dialog-enter-code.ts
index 574c58443b..fc4dc82c2e 100644
--- a/src/dialogs/enter-code/dialog-enter-code.ts
+++ b/src/dialogs/enter-code/dialog-enter-code.ts
@@ -137,36 +137,36 @@ export class DialogEnterCode
value === ""
? html` `
: value === "clear"
- ? html`
-
-
-
- `
- : value === "submit"
- ? html`
-
-
-
- `
- : html`
-
- ${value}
-
- `
+ ? html`
+
+
+
+ `
+ : value === "submit"
+ ? html`
+
+
+
+ `
+ : html`
+
+ ${value}
+
+ `
)}
diff --git a/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts b/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts
index 05adb8e556..333a301ad5 100644
--- a/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts
+++ b/src/dialogs/more-info/components/climate/ha-more-info-climate-temperature.ts
@@ -189,8 +189,8 @@ export class HaMoreInfoClimateTemperature extends LitElement {
{ action: actionLabel }
)
: action && action !== "off" && action !== "idle"
- ? actionLabel
- : this.hass.localize("ui.dialogs.more_info_control.climate.target")}
+ ? actionLabel
+ : this.hass.localize("ui.dialogs.more_info_control.climate.target")}
`;
}
diff --git a/src/dialogs/more-info/components/humidifier/ha-more-info-humidifier-humidity.ts b/src/dialogs/more-info/components/humidifier/ha-more-info-humidifier-humidity.ts
index d93f506f10..612720228a 100644
--- a/src/dialogs/more-info/components/humidifier/ha-more-info-humidifier-humidity.ts
+++ b/src/dialogs/more-info/components/humidifier/ha-more-info-humidifier-humidity.ts
@@ -104,10 +104,10 @@ export class HaMoreInfoHumidifierHumidity extends LitElement {
{ action: actionLabel }
)
: action && action !== "off" && action !== "idle"
- ? actionLabel
- : this.hass.localize(
- "ui.dialogs.more_info_control.humidifier.target"
- )}
+ ? actionLabel
+ : this.hass.localize(
+ "ui.dialogs.more_info_control.humidifier.target"
+ )}
`;
}
diff --git a/src/dialogs/more-info/controls/more-info-cover.ts b/src/dialogs/more-info/controls/more-info-cover.ts
index 3c2881017e..a26f6be6eb 100644
--- a/src/dialogs/more-info/controls/more-info-cover.ts
+++ b/src/dialogs/more-info/controls/more-info-cover.ts
@@ -139,13 +139,13 @@ class MoreInfoCover extends LitElement {
>
`
: supportsOpenClose || supportsTilt
- ? html`
-
- `
- : nothing}
+ ? html`
+
+ `
+ : nothing}
`
: nothing
}
diff --git a/src/dialogs/more-info/controls/more-info-input_datetime.ts b/src/dialogs/more-info/controls/more-info-input_datetime.ts
index 68926174d8..a44917e79a 100644
--- a/src/dialogs/more-info/controls/more-info-input_datetime.ts
+++ b/src/dialogs/more-info/controls/more-info-input_datetime.ts
@@ -39,8 +39,8 @@ class MoreInfoInputDatetime extends LitElement {
.value=${this.stateObj.state === UNKNOWN
? ""
: this.stateObj.attributes.has_date
- ? this.stateObj.state.split(" ")[1]
- : this.stateObj.state}
+ ? this.stateObj.state.split(" ")[1]
+ : this.stateObj.state}
.locale=${this.hass.locale}
.disabled=${isUnavailableState(this.stateObj.state)}
@value-changed=${this._timeChanged}
diff --git a/src/dialogs/more-info/controls/more-info-update.ts b/src/dialogs/more-info/controls/more-info-update.ts
index 195fe6f7d5..bf9b563a81 100644
--- a/src/dialogs/more-info/controls/more-info-update.ts
+++ b/src/dialogs/more-info/controls/more-info-update.ts
@@ -108,11 +108,11 @@ class MoreInfoUpdate extends LitElement {
`
: this.stateObj.attributes.release_summary
- ? html`
- `
- : ""}
+ ? html`
+ `
+ : ""}
${supportsFeature(this.stateObj, UPDATE_SUPPORT_BACKUP)
? html`
- ${this.hass.localize(
- "ui.dialogs.more_info_control.update.clear_skipped"
- )}
-
- `
- : html`
-
${this._showValue(item.templow)
@@ -292,8 +292,8 @@ class MoreInfoWeather extends LitElement {
item.templow
)
: hourly
- ? ""
- : "—"}
+ ? ""
+ : "—"}
${this._showValue(item.temperature)
diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts
index 8a9e45369a..ecc3411f08 100644
--- a/src/dialogs/more-info/ha-more-info-dialog.ts
+++ b/src/dialogs/more-info/ha-more-info-dialog.ts
@@ -429,41 +429,41 @@ export class MoreInfoDialog extends LitElement {
`
: this._currView === "info"
- ? html`
-
- `
- : this._currView === "history"
- ? html`
-
- `
- : this._currView === "settings"
- ? html`
-
- `
- : this._currView === "related"
- ? html`
-
- `
- : nothing
+ ? html`
+
+ `
+ : this._currView === "history"
+ ? html`
+
+ `
+ : this._currView === "settings"
+ ? html`
+
+ `
+ : this._currView === "related"
+ ? html`
+
+ `
+ : nothing
)}
diff --git a/src/dialogs/more-info/ha-more-info-history.ts b/src/dialogs/more-info/ha-more-info-history.ts
index 9953d319a0..2adeb515c4 100644
--- a/src/dialogs/more-info/ha-more-info-history.ts
+++ b/src/dialogs/more-info/ha-more-info-history.ts
@@ -84,24 +84,24 @@ export class MoreInfoHistory extends LitElement {
${this._error
? html`${this._error}
`
: this._statistics
- ? html` `
- : html` `}`
+ ? html` `
+ : html` `}`
: ""}`;
}
diff --git a/src/dialogs/quick-bar/ha-quick-bar.ts b/src/dialogs/quick-bar/ha-quick-bar.ts
index 27c8336de9..b849d4fe02 100644
--- a/src/dialogs/quick-bar/ha-quick-bar.ts
+++ b/src/dialogs/quick-bar/ha-quick-bar.ts
@@ -217,35 +217,36 @@ export class QuickBar extends LitElement {
active
>`
: items.length === 0
- ? html`
-
- ${this.hass.localize("ui.dialogs.quick-bar.nothing_found")}
-
- `
- : html`
-
- ${this._opened
- ? html`
- `
- : ""}
-
- `}
+ ? html`
+
+ ${this.hass.localize("ui.dialogs.quick-bar.nothing_found")}
+
+ `
+ : html`
+
+ ${this._opened
+ ? html`
+ `
+ : ""}
+
+ `}
${this._hint
? html`${this._hint} `
: ""}
diff --git a/src/fake_data/entity.ts b/src/fake_data/entity.ts
index f6e6912dfd..b001b4b7fc 100644
--- a/src/fake_data/entity.ts
+++ b/src/fake_data/entity.ts
@@ -349,8 +349,8 @@ class ClimateEntity extends Entity {
lowTarget >= current
? "heating"
: highTarget <= current
- ? "cooling"
- : "idle";
+ ? "cooling"
+ : "idle";
}
return state;
}
diff --git a/src/layouts/hass-subpage.ts b/src/layouts/hass-subpage.ts
index 75decf778a..c0763b5790 100644
--- a/src/layouts/hass-subpage.ts
+++ b/src/layouts/hass-subpage.ts
@@ -57,19 +57,19 @@ class HassSubpage extends LitElement {
>
`
: this.backPath
- ? html`
-
+ ? html`
+
+
+
+ `
+ : html`
-
- `
- : html`
-
- `}
+ `}
${this.header}
diff --git a/src/layouts/hass-tabs-subpage.ts b/src/layouts/hass-tabs-subpage.ts
index e8c470df3b..ac650afdd4 100644
--- a/src/layouts/hass-tabs-subpage.ts
+++ b/src/layouts/hass-tabs-subpage.ts
@@ -156,19 +156,19 @@ class HassTabsSubpage extends LitElement {
>
`
: this.backPath
- ? html`
-
+ ? html`
+
+
+
+ `
+ : html`
-
- `
- : html`
-
- `}
+ `}
${this.narrow || !showTabs
? html`
${!showTabs ? tabs[0] : ""}
diff --git a/src/layouts/home-assistant-main.ts b/src/layouts/home-assistant-main.ts
index dcaa2b460f..956c4c8eed 100644
--- a/src/layouts/home-assistant-main.ts
+++ b/src/layouts/home-assistant-main.ts
@@ -127,10 +127,10 @@ export class HomeAssistantMain extends LitElement {
dock: ev.detail?.open
? "docked"
: ev.detail?.open === false
- ? "auto"
- : this.hass.dockedSidebar === "auto"
- ? "docked"
- : "auto",
+ ? "auto"
+ : this.hass.dockedSidebar === "auto"
+ ? "docked"
+ : "auto",
});
}
});
diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts
index 2a4ba09139..e63bc8f211 100644
--- a/src/panels/config/automation/ha-automation-editor.ts
+++ b/src/panels/config/automation/ha-automation-editor.ts
@@ -342,50 +342,56 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
>
`
: this._mode === "yaml"
- ? html`
- ${this._readOnly
- ? html`
- ${this.hass.localize(
- "ui.panel.config.automation.editor.read_only"
- )}
-
+ ? html`
+ ${this._readOnly
+ ? html`
${this.hass.localize(
- "ui.panel.config.automation.editor.migrate"
+ "ui.panel.config.automation.editor.read_only"
)}
-
- `
- : ""}
- ${stateObj?.state === "off"
- ? html`
-
- ${this.hass.localize(
- "ui.panel.config.automation.editor.disabled"
- )}
-
+
${this.hass.localize(
- "ui.panel.config.automation.editor.enable"
+ "ui.panel.config.automation.editor.migrate"
)}
-
- `
- : ""}
-
-
-
-
- ${this.hass.localize(
- "ui.panel.config.automation.editor.copy_to_clipboard"
- )}
-
-
-
- `
- : ``}
+ `
+ : ""}
+ ${stateObj?.state === "off"
+ ? html`
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.editor.disabled"
+ )}
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.editor.enable"
+ )}
+
+
+ `
+ : ""}
+
+
+
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.editor.copy_to_clipboard"
+ )}
+
+
+
+ `
+ : ``}
`
: ""}
diff --git a/src/panels/config/automation/ha-automation-trace.ts b/src/panels/config/automation/ha-automation-trace.ts
index fbf52c6974..af20da030a 100644
--- a/src/panels/config/automation/ha-automation-trace.ts
+++ b/src/panels/config/automation/ha-automation-trace.ts
@@ -215,104 +215,104 @@ export class HaAutomationTrace extends LitElement {
${this._traces === undefined
? html`Loading…
`
: this._traces.length === 0
- ? html`No traces found
`
- : this._trace === undefined
- ? ""
- : html`
-
-
-
-
+ ? html`
No traces found
`
+ : this._trace === undefined
+ ? ""
+ : html`
+
+
+
+
-
-
- ${[
- ["details", "Step Details"],
- ["timeline", "Trace Timeline"],
- ["logbook", "Related logbook entries"],
- ["config", "Automation Config"],
- ].map(
- ([view, label]) => html`
-
- ${label}
-
- `
- )}
- ${this._trace.blueprint_inputs
- ? html`
-
- Blueprint Config
-
- `
- : ""}
+
+
+ ${[
+ ["details", "Step Details"],
+ ["timeline", "Trace Timeline"],
+ ["logbook", "Related logbook entries"],
+ ["config", "Automation Config"],
+ ].map(
+ ([view, label]) => html`
+
+ ${label}
+
+ `
+ )}
+ ${this._trace.blueprint_inputs
+ ? html`
+
+ Blueprint Config
+
+ `
+ : ""}
+
+ ${this._selected === undefined ||
+ this._logbookEntries === undefined ||
+ trackedNodes === undefined
+ ? ""
+ : this._view === "details"
+ ? html`
+
+ `
+ : this._view === "config"
+ ? html`
+
+ `
+ : this._view === "logbook"
+ ? html`
+
+ `
+ : this._view === "blueprint"
+ ? html`
+
+ `
+ : html`
+
+ `}
+
- ${this._selected === undefined ||
- this._logbookEntries === undefined ||
- trackedNodes === undefined
- ? ""
- : this._view === "details"
- ? html`
-
- `
- : this._view === "config"
- ? html`
-
- `
- : this._view === "logbook"
- ? html`
-
- `
- : this._view === "blueprint"
- ? html`
-
- `
- : html`
-
- `}
-
-
- `}
+ `}
`;
}
diff --git a/src/panels/config/cloud/account/cloud-account.ts b/src/panels/config/cloud/account/cloud-account.ts
index 2f0f3e791d..a1946add28 100644
--- a/src/panels/config/cloud/account/cloud-account.ts
+++ b/src/panels/config/cloud/account/cloud-account.ts
@@ -114,12 +114,12 @@ export class CloudAccount extends SubscribeMixin(LitElement) {
"ui.panel.config.cloud.account.connected"
)
: this.cloudStatus.cloud === "disconnected"
- ? this.hass.localize(
- "ui.panel.config.cloud.account.not_connected"
- )
- : this.hass.localize(
- "ui.panel.config.cloud.account.connecting"
- )}
+ ? this.hass.localize(
+ "ui.panel.config.cloud.account.not_connected"
+ )
+ : this.hass.localize(
+ "ui.panel.config.cloud.account.connecting"
+ )}
diff --git a/src/panels/config/cloud/account/cloud-remote-pref.ts b/src/panels/config/cloud/account/cloud-remote-pref.ts
index d9ac6bd89c..b77159d8e6 100644
--- a/src/panels/config/cloud/account/cloud-remote-pref.ts
+++ b/src/panels/config/cloud/account/cloud-remote-pref.ts
@@ -52,16 +52,16 @@ export class CloudRemotePref extends LitElement {
"ui.panel.config.cloud.account.remote.cerificate_error"
)
: remote_certificate_status === "loading"
- ? this.hass.localize(
- "ui.panel.config.cloud.account.remote.cerificate_loading"
- )
- : remote_certificate_status === "loaded"
- ? this.hass.localize(
- "ui.panel.config.cloud.account.remote.cerificate_loaded"
- )
- : this.hass.localize(
- "ui.panel.config.cloud.account.remote.access_is_being_prepared"
- )}
+ ? this.hass.localize(
+ "ui.panel.config.cloud.account.remote.cerificate_loading"
+ )
+ : remote_certificate_status === "loaded"
+ ? this.hass.localize(
+ "ui.panel.config.cloud.account.remote.cerificate_loaded"
+ )
+ : this.hass.localize(
+ "ui.panel.config.cloud.account.remote.access_is_being_prepared"
+ )}
`;
diff --git a/src/panels/config/cloud/account/cloud-webhooks.ts b/src/panels/config/cloud/account/cloud-webhooks.ts
index 3ef0791cb9..e469c57e0a 100644
--- a/src/panels/config/cloud/account/cloud-webhooks.ts
+++ b/src/panels/config/cloud/account/cloud-webhooks.ts
@@ -59,55 +59,57 @@ export class CloudWebhooks extends LitElement {
`
: this._localHooks.length === 0
- ? html`
-
`
- )}
+ : this._localHooks.map(
+ (entry) => html`
+
+
+ ${entry.name}
+ ${entry.domain !== entry.name.toLowerCase()
+ ? ` (${entry.domain})`
+ : ""}
+
+ ${entry.webhook_id}
+ ${this._progress.includes(entry.webhook_id)
+ ? html`
+
+
+
+ `
+ : this._cloudHooks![entry.webhook_id]
+ ? html`
+
+ ${this.hass!.localize(
+ "ui.panel.config.cloud.account.webhooks.manage"
+ )}
+
+ `
+ : html`
+ `}
+
+ `
+ )}
${this.hass.localize(
diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts
index ffaf82fcf9..1131d5214e 100644
--- a/src/panels/config/devices/ha-config-device-page.ts
+++ b/src/panels/config/devices/ha-config-device-page.ts
@@ -207,10 +207,10 @@ export class HaConfigDevicePage extends LitElement {
entry.entity_category
? entry.entity_category
: computeDomain(entry.entity_id) === "event"
- ? "event"
- : SENSOR_ENTITIES.includes(computeDomain(entry.entity_id))
- ? "sensor"
- : "control"
+ ? "event"
+ : SENSOR_ENTITIES.includes(computeDomain(entry.entity_id))
+ ? "sensor"
+ : "control"
) as Record<
| "control"
| "event"
diff --git a/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts
index c3cf3cc2aa..6ddfbc62d2 100644
--- a/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts
+++ b/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts
@@ -67,10 +67,10 @@ export class DialogEnergyGasSettings
this._costs = this._source.entity_energy_price
? "entity"
: this._source.number_energy_price
- ? "number"
- : this._source.stat_cost
- ? "statistic"
- : "no-costs";
+ ? "number"
+ : this._source.stat_cost
+ ? "statistic"
+ : "no-costs";
this._energy_units = (
await getSensorDeviceClassConvertibleUnits(this.hass, "energy")
).units;
@@ -100,8 +100,8 @@ export class DialogEnergyGasSettings
this._params.allowedGasUnitClass === undefined
? [...(this._gas_units || []), ...(this._energy_units || [])].join(", ")
: this._params.allowedGasUnitClass === "energy"
- ? this._energy_units?.join(", ") || ""
- : this._gas_units?.join(", ") || "";
+ ? this._energy_units?.join(", ") || ""
+ : this._gas_units?.join(", ") || "";
const unitPrice = this._pickedDisplayUnit
? `${this.hass.config.currency}/${this._pickedDisplayUnit}`
diff --git a/src/panels/config/energy/dialogs/dialog-energy-grid-flow-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-grid-flow-settings.ts
index 9531bf6b55..acd8f35c59 100644
--- a/src/panels/config/energy/dialogs/dialog-energy-grid-flow-settings.ts
+++ b/src/panels/config/energy/dialogs/dialog-energy-grid-flow-settings.ts
@@ -59,17 +59,17 @@ export class DialogEnergyGridFlowSettings
this._source = params.source
? { ...params.source }
: params.direction === "from"
- ? emptyFlowFromGridSourceEnergyPreference()
- : emptyFlowToGridSourceEnergyPreference();
+ ? emptyFlowFromGridSourceEnergyPreference()
+ : emptyFlowToGridSourceEnergyPreference();
this._costs = this._source.entity_energy_price
? "entity"
: this._source.number_energy_price
- ? "number"
- : this._source[
- params.direction === "from" ? "stat_cost" : "stat_compensation"
- ]
- ? "statistic"
- : "no-costs";
+ ? "number"
+ : this._source[
+ params.direction === "from" ? "stat_cost" : "stat_compensation"
+ ]
+ ? "statistic"
+ : "no-costs";
const initialSourceId =
this._source[
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 71de4be348..40e5263516 100644
--- a/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts
+++ b/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts
@@ -204,13 +204,13 @@ export class DialogEnergySolarSettings
domains.length === 0
? []
: domains.length === 1
- ? await getConfigEntries(this.hass, {
- type: ["service"],
- domain: domains[0],
- })
- : (await getConfigEntries(this.hass, { type: ["service"] })).filter(
- (entry) => domains.includes(entry.domain)
- );
+ ? await getConfigEntries(this.hass, {
+ type: ["service"],
+ domain: domains[0],
+ })
+ : (await getConfigEntries(this.hass, { type: ["service"] })).filter(
+ (entry) => domains.includes(entry.domain)
+ );
}
private _handleForecastChanged(ev: CustomEvent) {
diff --git a/src/panels/config/energy/dialogs/dialog-energy-water-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-water-settings.ts
index 6136fc6923..e6ae0fb403 100644
--- a/src/panels/config/energy/dialogs/dialog-energy-water-settings.ts
+++ b/src/panels/config/energy/dialogs/dialog-energy-water-settings.ts
@@ -62,10 +62,10 @@ export class DialogEnergyWaterSettings
this._costs = this._source.entity_energy_price
? "entity"
: this._source.number_energy_price
- ? "number"
- : this._source.stat_cost
- ? "statistic"
- : "no-costs";
+ ? "number"
+ : this._source.stat_cost
+ ? "statistic"
+ : "no-costs";
this._water_units = (
await getSensorDeviceClassConvertibleUnits(this.hass, "water")
).units;
diff --git a/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts b/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts
index dd42f8b34e..058363a974 100644
--- a/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts
+++ b/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts
@@ -86,16 +86,16 @@ export class EntityRegistrySettingsHelper extends LitElement {
this.entry.platform
)
: this._item === null
- ? this.hass.localize("ui.dialogs.helper_settings.yaml_not_editable")
- : html`
-
- ${dynamicElement(`ha-${this.entry.platform}-form`, {
- hass: this.hass,
- item: this._item,
- entry: this.entry,
- })}
-
- `}
+ ? this.hass.localize("ui.dialogs.helper_settings.yaml_not_editable")
+ : html`
+
+ ${dynamicElement(`ha-${this.entry.platform}-form`, {
+ hass: this.hass,
+ item: this._item,
+ entry: this.entry,
+ })}
+
+ `}
`
: this.helperConfigEntry?.domain === "switch_as_x"
- ? html`
-
- ${domainToName(this.hass.localize, "switch")}
-
-
- ${domainToName(this.hass.localize, domain)}
-
-
- ${this._switchAsDomainsSorted(
- SWITCH_AS_DOMAINS,
- this.hass.localize
- ).map((entry) =>
- domain === entry.domain
- ? nothing
- : html`
-
- ${entry.label}
-
- `
- )}
- `
- : nothing}
+ ? html`
+
+ ${domainToName(this.hass.localize, "switch")}
+
+
+ ${domainToName(this.hass.localize, domain)}
+
+
+ ${this._switchAsDomainsSorted(
+ SWITCH_AS_DOMAINS,
+ this.hass.localize
+ ).map((entry) =>
+ domain === entry.domain
+ ? nothing
+ : html`
+
+ ${entry.label}
+
+ `
+ )}
+ `
+ : nothing}
${this._deviceClassOptions
? html`
`
: this.entry.disabled_by
- ? html`${this.hass!.localize(
- "ui.dialogs.entity_registry.editor.entity_disabled"
- )}${["user", "integration"].includes(this.entry.disabled_by!)
- ? html`
- ${this.hass!.localize(
- "ui.dialogs.entity_registry.editor.enable_entity"
- )} `
- : ""}`
- : this.hass!.localize(
- "ui.dialogs.entity_registry.editor.unavailable"
- )}
+ ? html`${this.hass!.localize(
+ "ui.dialogs.entity_registry.editor.entity_disabled"
+ )}${["user", "integration"].includes(
+ this.entry.disabled_by!
+ )
+ ? html`
+ ${this.hass!.localize(
+ "ui.dialogs.entity_registry.editor.enable_entity"
+ )} `
+ : ""}`
+ : this.hass!.localize(
+ "ui.dialogs.entity_registry.editor.unavailable"
+ )}
`
: ""}
diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts
index 10e403b7ec..0986115af7 100644
--- a/src/panels/config/entities/ha-config-entities.ts
+++ b/src/panels/config/entities/ha-config-entities.ts
@@ -268,12 +268,12 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
.path=${entry.restored
? mdiRestoreAlert
: entry.unavailable
- ? mdiAlertCircle
- : entry.disabled_by
- ? mdiCancel
- : entry.hidden_by
- ? mdiEyeOff
- : mdiPencilOff}
+ ? mdiAlertCircle
+ : entry.disabled_by
+ ? mdiCancel
+ : entry.hidden_by
+ ? mdiEyeOff
+ : mdiPencilOff}
>
${entry.restored
@@ -281,20 +281,20 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
"ui.panel.config.entities.picker.status.restored"
)
: entry.unavailable
- ? this.hass.localize(
- "ui.panel.config.entities.picker.status.unavailable"
- )
- : entry.disabled_by
- ? this.hass.localize(
- "ui.panel.config.entities.picker.status.disabled"
- )
- : entry.hidden_by
- ? this.hass.localize(
- "ui.panel.config.entities.picker.status.hidden"
- )
- : this.hass.localize(
- "ui.panel.config.entities.picker.status.readonly"
- )}
+ ? this.hass.localize(
+ "ui.panel.config.entities.picker.status.unavailable"
+ )
+ : entry.disabled_by
+ ? this.hass.localize(
+ "ui.panel.config.entities.picker.status.disabled"
+ )
+ : entry.hidden_by
+ ? this.hass.localize(
+ "ui.panel.config.entities.picker.status.hidden"
+ )
+ : this.hass.localize(
+ "ui.panel.config.entities.picker.status.readonly"
+ )}
`
@@ -426,10 +426,10 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
status: restored
? localize("ui.panel.config.entities.picker.status.restored")
: unavailable
- ? localize("ui.panel.config.entities.picker.status.unavailable")
- : entry.disabled_by
- ? localize("ui.panel.config.entities.picker.status.disabled")
- : localize("ui.panel.config.entities.picker.status.ok"),
+ ? localize("ui.panel.config.entities.picker.status.unavailable")
+ : entry.disabled_by
+ ? localize("ui.panel.config.entities.picker.status.disabled")
+ : localize("ui.panel.config.entities.picker.status.ok"),
});
}
diff --git a/src/panels/config/hardware/ha-config-hardware.ts b/src/panels/config/hardware/ha-config-hardware.ts
index 6a7e9d21a7..c46b46e852 100644
--- a/src/panels/config/hardware/ha-config-hardware.ts
+++ b/src/panels/config/hardware/ha-config-hardware.ts
@@ -439,16 +439,16 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
`
: isComponentLoaded(this.hass, "hardware")
- ? html`
-
-
- ${this.hass.localize(
- "ui.panel.config.hardware.loading_system_data"
- )}
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.panel.config.hardware.loading_system_data"
+ )}
+
-
- `
- : ""}
+ `
+ : ""}
`;
diff --git a/src/panels/config/helpers/forms/ha-counter-form.ts b/src/panels/config/helpers/forms/ha-counter-form.ts
index c2b03630ab..479abac633 100644
--- a/src/panels/config/helpers/forms/ha-counter-form.ts
+++ b/src/panels/config/helpers/forms/ha-counter-form.ts
@@ -161,8 +161,8 @@ class HaCounterForm extends LitElement {
? Number(target.value)
: undefined
: target.localName === "ha-switch"
- ? (ev.target as HaSwitch).checked
- : ev.detail?.value || target.value;
+ ? (ev.target as HaSwitch).checked
+ : ev.detail?.value || target.value;
if (this[`_${configValue}`] === value) {
return;
}
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 c44fe057c8..76e3eac399 100644
--- a/src/panels/config/helpers/forms/ha-input_datetime-form.ts
+++ b/src/panels/config/helpers/forms/ha-input_datetime-form.ts
@@ -33,8 +33,8 @@ class HaInputDateTimeForm extends LitElement {
item.has_time && item.has_date
? "datetime"
: item.has_time
- ? "time"
- : "date";
+ ? "time"
+ : "date";
this._item.has_date =
!item.has_date && !item.has_time ? true : item.has_date;
} else {
diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts
index 356beed983..55d4ee7323 100644
--- a/src/panels/config/integrations/ha-config-integration-page.ts
+++ b/src/panels/config/integrations/ha-config-integration-page.ts
@@ -684,25 +684,25 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
${this.hass.localize("ui.common.enable")}
`
: configPanel &&
- (item.domain !== "matter" || isDevVersion(this.hass.config.version))
- ? html`