From 15395275ba6ee053393031bb24ecc643e557afc7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:31:56 -0500 Subject: [PATCH] Update dependency prettier to v3.1.0 (#18675) * Update dependency prettier to v3.1.0 * Reformat --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Steve Repsher --- build-scripts/gulp/app.js | 4 +- build-scripts/webpack.cjs | 4 +- cast/src/launcher/layout/hc-cast.ts | 76 +- cast/src/launcher/layout/hc-connect.ts | 14 +- demo/src/stubs/recorder.ts | 8 +- .../addon-store/hassio-addon-repository.ts | 12 +- .../addon-view/config/hassio-addon-config.ts | 86 +-- .../components/supervisor-formfield-label.ts | 7 +- hassio/src/dashboard/hassio-addons.ts | 14 +- .../datadisk/dialog-hassio-datadisk.ts | 12 +- hassio/src/hassio-router.ts | 4 +- hassio/src/system/hassio-supervisor-info.ts | 26 +- .../update-available/update-available-card.ts | 79 +- package.json | 2 +- src/auth/ha-auth-form-string.ts | 4 +- src/common/config/can_show_page.ts | 8 +- src/common/dom/get_main_window.ts | 4 +- src/common/entity/compute_state_display.ts | 4 +- src/common/entity/domain_icon.ts | 4 +- src/components/buttons/ha-progress-button.ts | 18 +- .../chart/state-history-chart-timeline.ts | 4 +- src/components/chart/statistics-chart.ts | 4 +- .../chart/timeline-chart/textbar-element.ts | 4 +- src/components/entity/ha-state-label-badge.ts | 18 +- src/components/ha-camera-stream.ts | 4 +- src/components/ha-control-circular-slider.ts | 8 +- src/components/ha-control-select-menu.ts | 4 +- src/components/ha-control-select.ts | 4 +- src/components/ha-control-switch.ts | 4 +- src/components/ha-file-upload.ts | 68 +- src/components/ha-form/ha-form-expandable.ts | 6 +- src/components/ha-form/ha-form-string.ts | 4 +- src/components/ha-form/ha-form.ts | 16 +- src/components/ha-gauge.ts | 4 +- src/components/ha-icon-overflow-menu.ts | 34 +- src/components/ha-icon-picker.ts | 10 +- src/components/ha-mount-picker.ts | 4 +- .../ha-selector/ha-selector-media.ts | 14 +- src/components/ha-service-control.ts | 22 +- src/components/ha-sidebar.ts | 17 +- src/components/ha-target-picker.ts | 68 +- .../media-player/dialog-media-manage.ts | 96 +-- .../media-player/ha-media-player-browse.ts | 200 +++--- src/components/trace/ha-trace-path-details.ts | 8 +- src/data/automation_i18n.ts | 52 +- src/data/energy.ts | 4 +- src/data/fan.ts | 4 +- src/data/history.ts | 4 +- src/data/light.ts | 4 +- src/data/media-player.ts | 40 +- src/data/weather.ts | 8 +- .../config-flow/dialog-data-entry-flow.ts | 199 ++--- .../previews/flow-preview-template.ts | 98 +-- src/dialogs/enter-code/dialog-enter-code.ts | 60 +- .../ha-more-info-climate-temperature.ts | 4 +- .../ha-more-info-humidifier-humidity.ts | 8 +- .../more-info/controls/more-info-cover.ts | 14 +- .../controls/more-info-input_datetime.ts | 4 +- .../more-info/controls/more-info-update.ts | 50 +- .../more-info/controls/more-info-weather.ts | 32 +- src/dialogs/more-info/ha-more-info-dialog.ts | 70 +- src/dialogs/more-info/ha-more-info-history.ts | 36 +- src/dialogs/quick-bar/ha-quick-bar.ts | 59 +- src/fake_data/entity.ts | 4 +- src/layouts/hass-subpage.ts | 20 +- src/layouts/hass-tabs-subpage.ts | 20 +- src/layouts/home-assistant-main.ts | 8 +- .../config/automation/ha-automation-editor.ts | 84 ++- .../config/automation/ha-automation-trace.ts | 192 ++--- .../config/cloud/account/cloud-account.ts | 12 +- .../config/cloud/account/cloud-remote-pref.ts | 20 +- .../config/cloud/account/cloud-webhooks.ts | 96 +-- src/panels/config/core/ha-config-analytics.ts | 4 +- .../core/ha-config-system-navigation.ts | 8 +- .../device-detail/ha-device-entities-card.ts | 10 +- .../zwave_js/ha-device-info-zwave_js.ts | 12 +- .../config/devices/ha-config-device-page.ts | 8 +- .../dialogs/dialog-energy-gas-settings.ts | 12 +- .../dialog-energy-grid-flow-settings.ts | 16 +- .../dialogs/dialog-energy-solar-settings.ts | 14 +- .../dialogs/dialog-energy-water-settings.ts | 8 +- .../settings/entity-settings-helper-tab.ts | 20 +- .../entity-registry-settings-editor.ts | 62 +- .../entities/entity-registry-settings.ts | 32 +- .../config/entities/ha-config-entities.ts | 48 +- .../config/hardware/ha-config-hardware.ts | 18 +- .../config/helpers/forms/ha-counter-form.ts | 4 +- .../helpers/forms/ha-input_datetime-form.ts | 4 +- .../ha-config-integration-page.ts | 62 +- .../ha-config-integrations-dashboard.ts | 105 +-- .../integrations/ha-integration-card.ts | 48 +- .../integrations/ha-integration-header.ts | 14 +- .../zha/dialog-zha-manage-zigbee-device.ts | 68 +- .../zwave_js/dialog-zwave_js-add-node.ts | 680 ++++++++++-------- .../dialog-zwave_js-update-firmware-node.ts | 136 ++-- src/panels/config/logs/system-log-card.ts | 76 +- .../dialog-lovelace-dashboard-detail.ts | 30 +- src/panels/config/script/ha-script-editor.ts | 36 +- src/panels/config/script/ha-script-trace.ts | 192 ++--- .../config/storage/dialog-mount-view.ts | 102 +-- .../storage/ha-config-section-storage.ts | 98 +-- .../debug/assist-pipeline-run-debug.ts | 59 +- .../voice-assistants/entity-voice-settings.ts | 4 +- .../ha-config-voice-assistants-expose.ts | 10 +- src/panels/config/zone/ha-config-zone.ts | 4 +- .../template/developer-tools-template.ts | 100 +-- .../energy/cards/energy-setup-wizard-card.ts | 58 +- src/panels/history/ha-panel-history.ts | 28 +- src/panels/logbook/ha-logbook.ts | 8 +- .../energy/hui-energy-distribution-card.ts | 46 +- .../cards/energy/hui-energy-gas-graph-card.ts | 16 +- .../hui-energy-solar-consumed-gauge-card.ts | 12 +- .../energy/hui-energy-solar-graph-card.ts | 16 +- .../energy/hui-energy-usage-graph-card.ts | 20 +- .../energy/hui-energy-water-graph-card.ts | 16 +- src/panels/lovelace/cards/hui-entity-card.ts | 16 +- src/panels/lovelace/cards/hui-glance-card.ts | 16 +- src/panels/lovelace/cards/hui-light-card.ts | 5 +- .../lovelace/cards/hui-markdown-card.ts | 6 +- .../lovelace/cards/hui-statistic-card.ts | 4 +- .../lovelace/cards/hui-thermostat-card.ts | 6 +- src/panels/lovelace/cards/hui-tile-card.ts | 4 +- .../lovelace/cards/hui-todo-list-card.ts | 32 +- .../cards/hui-weather-forecast-card.ts | 32 +- .../components/hui-energy-period-selector.ts | 40 +- .../components/hui-generic-entity-row.ts | 83 ++- src/panels/lovelace/components/hui-image.ts | 66 +- .../editor/card-editor/hui-card-picker.ts | 10 +- .../hui-weather-forecast-card-editor.ts | 4 +- src/panels/lovelace/editor/config-util.ts | 4 +- .../lovelace/editor/hui-sub-element-editor.ts | 44 +- .../elements/hui-state-badge-element.ts | 4 +- .../hui-input-datetime-entity-row.ts | 4 +- .../hui-media-player-entity-row.ts | 66 +- .../entity-rows/hui-weather-entity-row.ts | 32 +- src/panels/lovelace/hui-root.ts | 80 ++- .../special-rows/hui-attribute-row.ts | 20 +- .../lovelace/special-rows/hui-cast-row.ts | 36 +- .../media-browser/browser-media-player.ts | 4 +- .../media-browser/ha-bar-media-player.ts | 68 +- .../hui-dialog-web-browser-play-media.ts | 58 +- .../dialog-ha-mfa-module-setup-flow.ts | 70 +- src/panels/profile/ha-pick-theme-row.ts | 4 +- src/types.ts | 4 +- src/util/documentation-url.ts | 4 +- yarn.lock | 10 +- 146 files changed, 2733 insertions(+), 2648 deletions(-) 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`
${error}
` : !this.castManager.status - ? html` -

- - - Start Casting - -

- ` - : html` -
PICK A VIEW
- - ${( - this.lovelaceViews ?? [ - generateDefaultViewConfig({}, {}, {}, {}, () => ""), - ] - ).map( - (view, idx) => html` - - ${view.icon - ? html` - - ` - : ""} - ${view.title || view.path} - - ` - )} - - `} + ? html` +

+ + + Start Casting + +

+ ` + : html` +
PICK A VIEW
+ + ${( + this.lovelaceViews ?? [ + generateDefaultViewConfig({}, {}, {}, {}, () => ""), + ] + ).map( + (view, idx) => html` + + ${view.icon + ? html` + + ` + : ""} + ${view.title || view.path} + + ` + )} + + `}
${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.iconPath - ? html`` - : ""} + ? html`` + : ""} ${this.label} ${this.version ? html`(${this.version})` diff --git a/hassio/src/dashboard/hassio-addons.ts b/hassio/src/dashboard/hassio-addons.ts index 6c9ce1d5f2..7b3c9d166f 100644 --- a/hassio/src/dashboard/hassio-addons.ts +++ b/hassio/src/dashboard/hassio-addons.ts @@ -68,17 +68,19 @@ class HassioAddons extends LitElement { .iconTitle=${addon.state !== "started" ? this.supervisor.localize("dashboard.addon_stopped") : addon.update_available! - ? this.supervisor.localize( - "dashboard.addon_new_version" - ) - : this.supervisor.localize("dashboard.addon_running")} + ? this.supervisor.localize( + "dashboard.addon_new_version" + ) + : this.supervisor.localize( + "dashboard.addon_running" + )} .iconClass=${addon.update_available ? addon.state === "started" ? "update" : "update stopped" : addon.state === "started" - ? "running" - : "stopped"} + ? "running" + : "stopped"} .iconImage=${atLeastVersion( this.hass.config.version, 0, diff --git a/hassio/src/dialogs/datadisk/dialog-hassio-datadisk.ts b/hassio/src/dialogs/datadisk/dialog-hassio-datadisk.ts index 3724d16533..bcc262c7ec 100644 --- a/hassio/src/dialogs/datadisk/dialog-hassio-datadisk.ts +++ b/hassio/src/dialogs/datadisk/dialog-hassio-datadisk.ts @@ -105,12 +105,12 @@ class HassioDatadiskDialog extends LitElement { ` : this.devices === undefined - ? this.dialogParams.supervisor.localize( - "dialog.datadisk_move.loading_devices" - ) - : this.dialogParams.supervisor.localize( - "dialog.datadisk_move.no_devices" - )} + ? this.dialogParams.supervisor.localize( + "dialog.datadisk_move.loading_devices" + ) + : this.dialogParams.supervisor.localize( + "dialog.datadisk_move.no_devices" + )} ` : 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.hass.localize( - "ui.dialogs.more_info_control.update.skip" - )} - - `} + this.stateObj.attributes.skipped_version + ? html` + + ${this.hass.localize( + "ui.dialogs.more_info_control.update.clear_skipped" + )} + + ` + : html` + + ${this.hass.localize( + "ui.dialogs.more_info_control.update.skip" + )} + + `} ${supportsFeature(this.stateObj, UPDATE_SUPPORT_INSTALL) ? 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` - - ` - )} - ${this._trace.blueprint_inputs - ? html` - - ` - : ""} +
+
+ ${[ + ["details", "Step Details"], + ["timeline", "Trace Timeline"], + ["logbook", "Related logbook entries"], + ["config", "Automation Config"], + ].map( + ([view, label]) => html` + + ` + )} + ${this._trace.blueprint_inputs + ? 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` + + `} +
- ${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.hass.localize( - "ui.panel.config.cloud.account.webhooks.no_hooks_yet" - )} - ${this.hass.localize( - "ui.panel.config.cloud.account.webhooks.no_hooks_yet_link_integration" + ? 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( + "ui.panel.config.cloud.account.webhooks.no_hooks_yet_link_integration" + )} + + ${this.hass.localize( + "ui.panel.config.cloud.account.webhooks.no_hooks_yet2" + )} + ${this.hass.localize( + "ui.panel.config.cloud.account.webhooks.no_hooks_yet_link_automation" + )}. +
` - )} + : 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` - ${this.hass.localize( - "ui.panel.config.integrations.config_entry.configure" - )} - ` - : item.supports_options && !stateText - ? html` - - ${this.hass.localize( - "ui.panel.config.integrations.config_entry.configure" - )} - - ` - : ""} + (item.domain !== "matter" || isDevVersion(this.hass.config.version)) + ? html` + ${this.hass.localize( + "ui.panel.config.integrations.config_entry.configure" + )} + ` + : item.supports_options && !stateText + ? html` + + ${this.hass.localize( + "ui.panel.config.integrations.config_entry.configure" + )} + + ` + : ""} ` : item.source !== "system" - ? html` - ${this.hass.localize("ui.common.disable")} - - ` - : ""} + @request-selected=${this._handleDisable} + graphic="icon" + > + ${this.hass.localize("ui.common.disable")} + + ` + : ""} ${item.source !== "system" ? html`` ) : this._filter && - !configEntriesInProgress.length && - !integrations.length && - this.configEntries.length - ? html` -
    -

    - ${this.hass.localize( - "ui.panel.config.integrations.none_found" - )} -

    -

    - ${this.hass.localize( - "ui.panel.config.integrations.none_found_detail" - )} -

    - -
    - ` - : // If we have a filter, never show a card - this._filter - ? "" - : // If we're showing 0 cards, show empty state text - (!this._showIgnored || ignoredConfigEntries.length === 0) && - (!this._showDisabled || disabledConfigEntries.length === 0) && - integrations.length === 0 - ? html` -
    -

    - ${this.hass.localize("ui.panel.config.integrations.none")} -

    -

    - ${this.hass.localize( - "ui.panel.config.integrations.no_integrations" - )} -

    - -
    - ` - : ""} + !configEntriesInProgress.length && + !integrations.length && + this.configEntries.length + ? html` +
    +

    + ${this.hass.localize( + "ui.panel.config.integrations.none_found" + )} +

    +

    + ${this.hass.localize( + "ui.panel.config.integrations.none_found_detail" + )} +

    + +
    + ` + : // If we have a filter, never show a card + this._filter + ? "" + : // If we're showing 0 cards, show empty state text + (!this._showIgnored || ignoredConfigEntries.length === 0) && + (!this._showDisabled || + disabledConfigEntries.length === 0) && + integrations.length === 0 + ? html` +
    +

    + ${this.hass.localize( + "ui.panel.config.integrations.none" + )} +

    +

    + ${this.hass.localize( + "ui.panel.config.integrations.no_integrations" + )} +

    + +
    + ` + : ""} @@ -146,26 +146,26 @@ export class HaIntegrationCard extends LitElement { ` : entities.length > 0 - ? html` - - ${this.hass.localize( - `ui.panel.config.integrations.config_entry.entities`, - "count", - entities.length - )} - - ` - : html` - - ${this.hass.localize( - `ui.panel.config.integrations.config_entry.entries`, - "count", - this.items.length - )} - - `} + ? html` + + ${this.hass.localize( + `ui.panel.config.integrations.config_entry.entities`, + "count", + entities.length + )} + + ` + : html` + + ${this.hass.localize( + `ui.panel.config.integrations.config_entry.entries`, + "count", + this.items.length + )} + + `}
    ${this.manifest && !this.manifest.is_built_in ? html` diff --git a/src/panels/config/integrations/ha-integration-header.ts b/src/panels/config/integrations/ha-integration-header.ts index 9a18b83b69..e93aa4fb8e 100644 --- a/src/panels/config/integrations/ha-integration-header.ts +++ b/src/panels/config/integrations/ha-integration-header.ts @@ -56,13 +56,13 @@ export class HaIntegrationHeader extends LitElement {
    ` : this.warning - ? html` -
    - - ${this.warning} -
    - ` - : nothing} + ? html` +
    + + ${this.warning} +
    + ` + : nothing} ` : this._currTab === "bindings" - ? html` - ${this._bindableDevices.length > 0 - ? html` - - ` - : ""} - ${this._device && this._groups.length > 0 - ? html` - - ` - : ""} - ` - : this._currTab === "signature" - ? html` - - ` - : html` - - ` + ? html` + ${this._bindableDevices.length > 0 + ? html` + + ` + : ""} + ${this._device && this._groups.length > 0 + ? html` + + ` + : ""} + ` + : this._currTab === "signature" + ? html` + + ` + : html` + + ` )} 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 7ffc6554b2..1cac5c00a9 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 @@ -119,76 +119,80 @@ class DialogZWaveJSAddNode extends LitElement { ` : this._status === "choose_strategy" - ? html`

    Choose strategy

    -
    - Secure if possible -
    - Requires user interaction during inclusion. Fast and - secure with S2 when supported. Fallback to legacy S0 or no - encryption when necessary. -
    `} - > - Choose strategy +
    + Secure if possible +
    + Requires user interaction during inclusion. Fast and + secure with S2 when supported. Fallback to legacy S0 or + no encryption when necessary. +
    `} > - -
    - Legacy Secure -
    - Uses the older S0 security that is secure, but slow due to - a lot of overhead. Allows securely including S2 capable - devices which fail to be included with S2. -
    `} - > - + +
    + Legacy Secure +
    + Uses the older S0 security that is secure, but slow due + to a lot of overhead. Allows securely including S2 + capable devices which fail to be included with S2. +
    `} > - -
    - Insecure -
    Do not use encryption.
    `} - > - + +
    + Insecure +
    Do not use encryption.
    `} > - -
    -
    - - Search device - ` - : this._status === "qr_scan" - ? html`${this._error - ? html`${this._error}` - : ""} - - - ${this.hass.localize("ui.panel.config.zwave_js.common.back")} - ` - : this._status === "validate_dsk_enter_pin" - ? html` + + +
    +
    + + Search device + ` + : this._status === "qr_scan" + ? html`${this._error + ? html`${this._error}` + : ""} + + + ${this.hass.localize( + "ui.panel.config.zwave_js.common.back" + )} + ` + : this._status === "validate_dsk_enter_pin" + ? html`

    Please enter the 5-digit PIN for your device and verify that the rest of the device-specific key matches the one that can @@ -217,262 +221,300 @@ class DialogZWaveJSAddNode extends LitElement { ` - : this._status === "grant_security_classes" - ? html` -

    The device has requested the following security classes:

    - ${this._error - ? html`${this._error}` - : ""} -
    - ${this._requestedGrant?.securityClasses - .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` - )} -
    `} - > - + The device has requested the following security classes: + + ${this._error + ? html`${this._error}` + : ""} +
    + ${this._requestedGrant?.securityClasses + .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` + )} +
    `} + > + + +
    ` )} +
    + + Submit + + ` + : this._status === "timed_out" + ? html` +

    Timed out!

    +

    + We have not found any device in inclusion mode. Make + sure the device is active and in inclusion mode. +

    + -
    -
    ` - )} -
    - - Submit - - ` - : this._status === "timed_out" - ? html` -

    Timed out!

    -

    - We have not found any device in inclusion mode. Make sure the - device is active and in inclusion mode. -

    - - Retry - - ` - : this._status === "started_specific" - ? html`

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.searching_device" - )} -

    - -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.follow_device_instructions" - )} -

    ` - : this._status === "started" - ? html` -
    -
    -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.searching_device" - )} -

    - -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.follow_device_instructions" - )} -

    -

    - -

    -
    - ${this._supportsSmartStart - ? html`
    -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.qr_code" - )} -

    - -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.qr_code_paragraph" - )} -

    -

    - - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.scan_qr_code" - )} + Retry -

    -
    ` - : ""} -
    - - ${this.hass.localize("ui.common.cancel")} - - ` - : this._status === "interviewing" - ? html` -
    - -
    -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.interview_started" - )} -

    - ${this._stages - ? html`
    - ${this._stages.map( - (stage) => html` - - - ${stage} - + ` + : this._status === "started_specific" + ? html`

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.searching_device" + )} +

    + +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.follow_device_instructions" + )} +

    ` + : this._status === "started" + ? html` +
    +
    +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.searching_device" + )} +

    + +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.follow_device_instructions" + )} +

    +

    + +

    +
    + ${this._supportsSmartStart + ? html`
    +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.qr_code" + )} +

    + +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.qr_code_paragraph" + )} +

    +

    + + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.scan_qr_code" + )} + +

    +
    ` + : ""} +
    + + ${this.hass.localize("ui.common.cancel")} + ` - )} -
    ` - : ""} -
    -
    - - ${this.hass.localize("ui.common.close")} - - ` - : this._status === "failed" - ? html` -
    -
    - - ${this._error || - this.hass.localize( - "ui.panel.config.zwave_js.add_node.check_logs" - )} - - ${this._stages - ? html`
    - ${this._stages.map( - (stage) => html` - - - ${stage} - - ` - )} -
    ` - : ""} -
    -
    - - ${this.hass.localize("ui.common.close")} - - ` - : this._status === "finished" - ? html` -
    - -
    -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.inclusion_finished" - )} -

    - ${this._lowSecurity - ? html` - There was an error during secure inclusion. You can try - again by excluding the device and adding it again. - ` - : ""} - - - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.view_device" - )} - - - ${this._stages - ? html`
    - ${this._stages.map( - (stage) => html` - - - ${stage} - - ` - )} -
    ` - : ""} -
    -
    - - ${this.hass.localize("ui.common.close")} - - ` - : this._status === "provisioned" - ? html`
    - -
    -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.add_node.provisioning_finished" - )} -

    -
    -
    - - ${this.hass.localize("ui.common.close")} - ` - : ""} + : this._status === "interviewing" + ? html` +
    + +
    +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.interview_started" + )} +

    + ${this._stages + ? html`
    + ${this._stages.map( + (stage) => html` + + + ${stage} + + ` + )} +
    ` + : ""} +
    +
    + + ${this.hass.localize("ui.common.close")} + + ` + : this._status === "failed" + ? html` +
    +
    + + ${this._error || + this.hass.localize( + "ui.panel.config.zwave_js.add_node.check_logs" + )} + + ${this._stages + ? html`
    + ${this._stages.map( + (stage) => html` + + + ${stage} + + ` + )} +
    ` + : ""} +
    +
    + + ${this.hass.localize("ui.common.close")} + + ` + : this._status === "finished" + ? html` +
    + +
    +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.inclusion_finished" + )} +

    + ${this._lowSecurity + ? html` + There was an error during secure + inclusion. You can try again by + excluding the device and adding it + again. + ` + : ""} + + + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.view_device" + )} + + + ${this._stages + ? html`
    + ${this._stages.map( + (stage) => html` + + + ${stage} + + ` + )} +
    ` + : ""} +
    +
    + + ${this.hass.localize("ui.common.close")} + + ` + : this._status === "provisioned" + ? html`
    + +
    +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.add_node.provisioning_finished" + )} +

    +
    +
    + + ${this.hass.localize("ui.common.close")} + ` + : ""} `; } diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-update-firmware-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-update-firmware-node.ts index b154162f83..511d13cea7 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-update-firmware-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-update-firmware-node.ts @@ -215,77 +215,77 @@ class DialogZWaveJSUpdateFirmwareNode extends LitElement { ${abortFirmwareUpdateButton} ` : this._updateProgressMessage && !this._updateFinishedMessage - ? html` -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.update_firmware.in_progress", - { - device: html`${this._deviceName}`, - progress: ( - (this._updateProgressMessage.sent_fragments * 100) / - this._updateProgressMessage.total_fragments - ).toFixed(2), - } - )} -

    - -

    - ${this.hass.localize( - "ui.panel.config.zwave_js.update_firmware.close", - { - device: html`${this._deviceName}`, - } - )} -

    - ${abortFirmwareUpdateButton} - ` - : html` -
    - -
    -

    - ${this.hass.localize( - `ui.panel.config.zwave_js.update_firmware.finished_status.${status}`, - { - device: html`${this._deviceName}`, - message: this.hass.localize( - `ui.panel.config.zwave_js.update_firmware.finished_status.${ - this._nodeStatus.is_controller_node - ? ControllerFirmwareUpdateStatus[ - this._updateFinishedMessage!.status - ] - : NodeFirmwareUpdateStatus[ - this._updateFinishedMessage!.status - ] - }` - ), - } - )} -

    -
    -
    - ${this._updateFinishedMessage!.success - ? html`

    - ${this.hass.localize( - `ui.panel.config.zwave_js.update_firmware.finished_status.done${localizationKeySuffix}` - )} -

    ` - : html`

    + ? html` +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.update_firmware.in_progress", + { + device: html`${this._deviceName}`, + progress: ( + (this._updateProgressMessage.sent_fragments * 100) / + this._updateProgressMessage.total_fragments + ).toFixed(2), + } + )} +

    + +

    + ${this.hass.localize( + "ui.panel.config.zwave_js.update_firmware.close", + { + device: html`${this._deviceName}`, + } + )} +

    + ${abortFirmwareUpdateButton} + ` + : html` +
    + +
    +

    ${this.hass.localize( - "ui.panel.config.zwave_js.update_firmware.finished_status.try_again" + `ui.panel.config.zwave_js.update_firmware.finished_status.${status}`, + { + device: html`${this._deviceName}`, + message: this.hass.localize( + `ui.panel.config.zwave_js.update_firmware.finished_status.${ + this._nodeStatus.is_controller_node + ? ControllerFirmwareUpdateStatus[ + this._updateFinishedMessage!.status + ] + : NodeFirmwareUpdateStatus[ + this._updateFinishedMessage!.status + ] + }` + ), + } )}

    - ${beginFirmwareUpdateHTML}`} - `} +
    +
    + ${this._updateFinishedMessage!.success + ? html`

    + ${this.hass.localize( + `ui.panel.config.zwave_js.update_firmware.finished_status.done${localizationKeySuffix}` + )} +

    ` + : html`

    + ${this.hass.localize( + "ui.panel.config.zwave_js.update_firmware.finished_status.try_again" + )} +

    + ${beginFirmwareUpdateHTML}`} + `} `; } diff --git a/src/panels/config/logs/system-log-card.ts b/src/panels/config/logs/system-log-card.ts index 5aa78b4248..49a41880c7 100644 --- a/src/panels/config/logs/system-log-card.ts +++ b/src/panels/config/logs/system-log-card.ts @@ -119,45 +119,45 @@ export class SystemLogCard extends LitElement { ` : filteredItems.length === 0 && this.filter - ? html`
    - ${this.hass.localize( - "ui.panel.config.logs.no_issues_search", - "term", - this.filter + ? html`
    + ${this.hass.localize( + "ui.panel.config.logs.no_issues_search", + "term", + this.filter + )} +
    ` + : filteredItems.map( + (item, idx) => html` + + +
    ${item.message[0]}
    +
    + ${this._timestamp(item)} – + ${html`(${this.hass.localize( + `ui.panel.config.logs.level.${item.level}` + )}) `} + ${integrations[idx] + ? `${domainToName( + this.hass!.localize, + integrations[idx]! + )}${ + isCustomIntegrationError(item) + ? ` (${this.hass.localize( + "ui.panel.config.logs.custom_integration" + )})` + : "" + }` + : item.source[0]} + ${item.count > 1 + ? html` - ${this._multipleMessages(item)} ` + : nothing} +
    +
    +
    + ` )} -
    ` - : filteredItems.map( - (item, idx) => html` - - -
    ${item.message[0]}
    -
    - ${this._timestamp(item)} – - ${html`(${this.hass.localize( - `ui.panel.config.logs.level.${item.level}` - )}) `} - ${integrations[idx] - ? `${domainToName( - this.hass!.localize, - integrations[idx]! - )}${ - isCustomIntegrationError(item) - ? ` (${this.hass.localize( - "ui.panel.config.logs.custom_integration" - )})` - : "" - }` - : item.source[0]} - ${item.count > 1 - ? html` - ${this._multipleMessages(item)} ` - : nothing} -
    -
    -
    - ` - )}
    - `} + ? this.hass.localize( + "ui.panel.config.lovelace.dashboards.cant_edit_default" + ) + : html` + + `}
    ${this._params.urlPath ? html` @@ -208,8 +208,8 @@ export class DialogLovelaceDashboardDetail extends LitElement { entry.name === "show_in_sidebar" ? "show_sidebar" : entry.name === "url_path" - ? "url" - : entry.name + ? "url" + : entry.name }` ); diff --git a/src/panels/config/script/ha-script-editor.ts b/src/panels/config/script/ha-script-editor.ts index 38e866fb2b..5652ed607e 100644 --- a/src/panels/config/script/ha-script-editor.ts +++ b/src/panels/config/script/ha-script-editor.ts @@ -405,24 +405,24 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) { ` : this._mode === "yaml" - ? html` - - -
    - - ${this.hass.localize( - "ui.panel.config.automation.editor.copy_to_clipboard" - )} - -
    -
    - ` - : ``} + ? html` + + +
    + + ${this.hass.localize( + "ui.panel.config.automation.editor.copy_to_clipboard" + )} + +
    +
    + ` + : ``} 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", "Script Config"], - ].map( - ([view, label]) => html` - - ` - )} - ${this._trace.blueprint_inputs - ? html` - - ` - : ""} +
    +
    + ${[ + ["details", "Step Details"], + ["timeline", "Trace Timeline"], + ["logbook", "Related logbook entries"], + ["config", "Script Config"], + ].map( + ([view, label]) => html` + + ` + )} + ${this._trace.blueprint_inputs + ? 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` + + `} +
    - ${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/storage/dialog-mount-view.ts b/src/panels/config/storage/dialog-mount-view.ts index 0cb65707a6..51edb64209 100644 --- a/src/panels/config/storage/dialog-mount-view.ts +++ b/src/panels/config/storage/dialog-mount-view.ts @@ -92,59 +92,59 @@ const mountSchema = memoizeOne( }, ] as const) : mountType === "cifs" - ? ([ - ...(showCIFSVersion - ? ([ - { - name: "version", - required: true, - selector: { - select: { - options: [ - { - label: localize( - "ui.panel.config.storage.network_mounts.cifs_versions.auto" - ), - value: "auto", - }, - { - label: localize( - "ui.panel.config.storage.network_mounts.cifs_versions.legacy", - { version: "2.0" } - ), - value: "2.0", - }, - { - label: localize( - "ui.panel.config.storage.network_mounts.cifs_versions.legacy", - { version: "1.0" } - ), - value: "1.0", - }, - ], - mode: "dropdown", + ? ([ + ...(showCIFSVersion + ? ([ + { + name: "version", + required: true, + selector: { + select: { + options: [ + { + label: localize( + "ui.panel.config.storage.network_mounts.cifs_versions.auto" + ), + value: "auto", + }, + { + label: localize( + "ui.panel.config.storage.network_mounts.cifs_versions.legacy", + { version: "2.0" } + ), + value: "2.0", + }, + { + label: localize( + "ui.panel.config.storage.network_mounts.cifs_versions.legacy", + { version: "1.0" } + ), + value: "1.0", + }, + ], + mode: "dropdown", + }, }, }, - }, - ] as const) - : ([] as const)), - { - name: "share", - required: true, - selector: { text: {} }, - }, - { - name: "username", - required: false, - selector: { text: {} }, - }, - { - name: "password", - required: false, - selector: { text: { type: "password" } }, - }, - ] as const) - : ([] as const)), + ] as const) + : ([] as const)), + { + name: "share", + required: true, + selector: { text: {} }, + }, + { + name: "username", + required: false, + selector: { text: {} }, + }, + { + name: "password", + required: false, + selector: { text: { type: "password" } }, + }, + ] as const) + : ([] as const)), ] as const ); diff --git a/src/panels/config/storage/ha-config-section-storage.ts b/src/panels/config/storage/ha-config-section-storage.ts index ccfd3521b0..91b8456372 100644 --- a/src/panels/config/storage/ha-config-section-storage.ts +++ b/src/panels/config/storage/ha-config-section-storage.ts @@ -168,56 +168,56 @@ class HaConfigSectionStorage extends LitElement { )} ` : validMounts?.length - ? html` - ${validMounts.map( - (mount) => html` - -
    - -
    - - ${mount.name} - - - ${mount.server}${mount.port - ? `:${mount.port}` - : nothing}${mount.type === SupervisorMountType.NFS - ? mount.path - : `:${mount.share}`} - - ${mount.state !== SupervisorMountState.ACTIVE - ? html`` - : html``} -
    - ` - )} -
    ` - : html`
    - -

    - ${this.hass.localize( - "ui.panel.config.storage.network_mounts.no_mounts" + ? html` + ${validMounts.map( + (mount) => html` + +

    + +
    + + ${mount.name} + + + ${mount.server}${mount.port + ? `:${mount.port}` + : nothing}${mount.type === SupervisorMountType.NFS + ? mount.path + : `:${mount.share}`} + + ${mount.state !== SupervisorMountState.ACTIVE + ? html`` + : html``} + + ` )} -

    -
    `} + ` + : html`
    + +

    + ${this.hass.localize( + "ui.panel.config.storage.network_mounts.no_mounts" + )} +

    +
    `} ${this._mountsInfo !== null ? html`
    diff --git a/src/panels/config/voice-assistants/debug/assist-pipeline-run-debug.ts b/src/panels/config/voice-assistants/debug/assist-pipeline-run-debug.ts index 7ba08a670a..67b902ba65 100644 --- a/src/panels/config/voice-assistants/debug/assist-pipeline-run-debug.ts +++ b/src/panels/config/voice-assistants/debug/assist-pipeline-run-debug.ts @@ -104,38 +104,39 @@ export class AssistPipelineRunDebug extends LitElement {
    ` : this._pipelineRuns[0].init_options!.start_stage === "intent" - ? html` - - - Send - - ` - : this._finished - ? this._pipelineRuns[0].init_options!.start_stage === "wake_word" ? html` - - Continue listening for wake word + + + Send ` - : html` - Continue talking - ` - : html` - - - - `} + : this._finished + ? this._pipelineRuns[0].init_options!.start_stage === + "wake_word" + ? html` + + Continue listening for wake word + + ` + : html` + Continue talking + ` + : html` + + + + `}
    ${this._pipelineRuns.map((run) => diff --git a/src/panels/config/voice-assistants/entity-voice-settings.ts b/src/panels/config/voice-assistants/entity-voice-settings.ts index 191f5a58b1..c966d39aed 100644 --- a/src/panels/config/voice-assistants/entity-voice-settings.ts +++ b/src/panels/config/voice-assistants/entity-voice-settings.ts @@ -203,8 +203,8 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) { alexaManual && key === "cloud.alexa" ? manExposedAlexa : googleManual && key === "cloud.google_assistant" - ? manExposedGoogle - : this.exposed[key]; + ? manExposedGoogle + : this.exposed[key]; const manualConfig = (alexaManual && key === "cloud.alexa") || 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 abfc59eacf..a579ef1025 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 @@ -203,11 +203,11 @@ export class VoiceAssistantsExpose extends LitElement { entry.aliases.length === 0 ? "-" : entry.aliases.length === 1 - ? entry.aliases[0] - : this.hass.localize( - "ui.panel.config.voice_assistants.expose.aliases", - { count: entry.aliases.length } - ), + ? entry.aliases[0] + : this.hass.localize( + "ui.panel.config.voice_assistants.expose.aliases", + { count: entry.aliases.length } + ), }, remove: { title: "", diff --git a/src/panels/config/zone/ha-config-zone.ts b/src/panels/config/zone/ha-config-zone.ts index 2e3c3b587a..c3e302cdd7 100644 --- a/src/panels/config/zone/ha-config-zone.ts +++ b/src/panels/config/zone/ha-config-zone.ts @@ -92,8 +92,8 @@ export class HaConfigZone extends SubscribeMixin(LitElement) { entityState.entity_id === "zone.home" ? homeRadiusColor : entityState.attributes.passive - ? passiveRadiusColor - : zoneRadiusColor, + ? passiveRadiusColor + : zoneRadiusColor, location_editable: entityState.entity_id === "zone.home" && this._canEditCore, radius_editable: false, diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts index e3596b6a3f..dd85fccc2c 100644 --- a/src/panels/developer-tools/template/developer-tools-template.ts +++ b/src/panels/developer-tools/template/developer-tools-template.ts @@ -190,57 +190,57 @@ class HaPanelDevTemplate extends LitElement { ${!this._templateResult.listeners ? nothing : this._templateResult.listeners.all - ? html` -

    - ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.all_listeners" - )} -

    - ` - : this._templateResult.listeners.domains.length || - this._templateResult.listeners.entities.length - ? html` -

    - ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.listeners" - )} -

    -
      - ${this._templateResult.listeners.domains - .sort() - .map( - (domain) => html` -
    • - ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.domain" - )}: ${domain} -
    • - ` + ? html` +

      + ${this.hass.localize( + "ui.panel.developer-tools.tabs.templates.all_listeners" )} - ${this._templateResult.listeners.entities - .sort() - .map( - (entity_id) => html` -

    • - ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.entity" - )}: ${entity_id} -
    • - ` - )} -
    - ` - : !this._templateResult.listeners.time - ? html` - ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.no_listeners" - )} - ` - : nothing}` +

    + ` + : this._templateResult.listeners.domains.length || + this._templateResult.listeners.entities.length + ? html` +

    + ${this.hass.localize( + "ui.panel.developer-tools.tabs.templates.listeners" + )} +

    +
      + ${this._templateResult.listeners.domains + .sort() + .map( + (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} +
    • + ` + )} +
    + ` + : !this._templateResult.listeners.time + ? html` + ${this.hass.localize( + "ui.panel.developer-tools.tabs.templates.no_listeners" + )} + ` + : nothing}` : nothing} diff --git a/src/panels/energy/cards/energy-setup-wizard-card.ts b/src/panels/energy/cards/energy-setup-wizard-card.ts index 0944abce63..a68b1b3438 100644 --- a/src/panels/energy/cards/energy-setup-wizard-card.ts +++ b/src/panels/energy/cards/energy-setup-wizard-card.ts @@ -65,35 +65,35 @@ export class EnergySetupWizard extends LitElement implements LovelaceCard { @value-changed=${this._prefsChanged} >` : this._step === 1 - ? html`` - : this._step === 2 - ? html`` - : this._step === 3 - ? html`` - : this._step === 4 - ? html`` - : html``} + ? html`` + : this._step === 2 + ? html`` + : this._step === 3 + ? html`` + : this._step === 4 + ? html`` + : html``}
    ${this._step > 0 ? html`
    ` : !this._targetPickerValue - ? html`` - : html` - - - `} + ? html`` + : html` + + + `} `; @@ -345,8 +345,8 @@ class HaPanelHistory extends SubscribeMixin(LitElement) { timespan < 2 ? 10000 : timespan < 10 - ? 60 * 1000 - : MIN_TIME_BETWEEN_UPDATES + ? 60 * 1000 + : MIN_TIME_BETWEEN_UPDATES ); } diff --git a/src/panels/logbook/ha-logbook.ts b/src/panels/logbook/ha-logbook.ts index bc3c13520c..026a44ea19 100644 --- a/src/panels/logbook/ha-logbook.ts +++ b/src/panels/logbook/ha-logbook.ts @@ -343,10 +343,10 @@ export class HaLogbook extends LitElement { !this._logbookEntries ? [] : purgeBeforePythonTime - ? this._logbookEntries.filter( - (entry) => entry.when > purgeBeforePythonTime! - ) - : this._logbookEntries; + ? this._logbookEntries.filter( + (entry) => entry.when > purgeBeforePythonTime! + ) + : this._logbookEntries; private _processOrQueueStreamMessage = ( streamMessage: LogbookStreamMessage 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 e621bdea72..6fe0e0ba56 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts @@ -314,8 +314,8 @@ class HuiEnergyDistrubutionCard ` : hasGas || hasWater - ? html`
    ` - : ""} + ? html`
    ` + : ""} ${hasGas ? html`
    ` : hasWater - ? html`
    - ${this.hass.localize( - "ui.panel.lovelace.cards.energy.energy_distribution.water" - )} -
    - - ${formatNumber(waterUsage || 0, this.hass.locale, { - maximumFractionDigits: 1, - })} - ${getEnergyWaterUnit(this.hass) || "m³"} -
    - - - ${waterUsage - ? svg` + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_distribution.water" + )} +
    + + ${formatNumber(waterUsage || 0, this.hass.locale, { + maximumFractionDigits: 1, + })} + ${getEnergyWaterUnit(this.hass) || "m³"} +
    + + + ${waterUsage + ? svg` ` - : ""} - -
    ` - : html`
    `} + : ""} + + ` + : html`
    `} ` : ""}
    diff --git a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts index bba8065562..b6a2dc1c5c 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts @@ -187,18 +187,18 @@ export class HuiEnergyGasGraphCard dayDifference > 35 ? "monthyear" : dayDifference > 7 - ? "date" - : dayDifference > 2 - ? "weekday" - : dayDifference > 0 - ? "datetime" - : "hour", + ? "date" + : dayDifference > 2 + ? "weekday" + : dayDifference > 0 + ? "datetime" + : "hour", minUnit: dayDifference > 35 ? "month" : dayDifference > 2 - ? "day" - : "hour", + ? "day" + : "hour", }, offset: true, }, diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts index c9dee769da..6f136b9a21 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts @@ -127,12 +127,12 @@ class HuiEnergySolarGaugeCard
    ` : totalSolarProduction === 0 - ? this.hass.localize( - "ui.panel.lovelace.cards.energy.solar_consumed_gauge.not_produced_solar_energy" - ) - : this.hass.localize( - "ui.panel.lovelace.cards.energy.solar_consumed_gauge.self_consumed_solar_could_not_calc" - )} + ? this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.not_produced_solar_energy" + ) + : this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.self_consumed_solar_could_not_calc" + )} `; } diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts index 182607e57d..3f9956bfab 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts @@ -184,18 +184,18 @@ export class HuiEnergySolarGraphCard dayDifference > 35 ? "monthyear" : dayDifference > 7 - ? "date" - : dayDifference > 2 - ? "weekday" - : dayDifference > 0 - ? "datetime" - : "hour", + ? "date" + : dayDifference > 2 + ? "weekday" + : dayDifference > 0 + ? "datetime" + : "hour", minUnit: dayDifference > 35 ? "month" : dayDifference > 2 - ? "day" - : "hour", + ? "day" + : "hour", }, }, y: { diff --git a/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts index 1def2a1de6..f904d837fa 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts @@ -183,18 +183,18 @@ export class HuiEnergyUsageGraphCard dayDifference > 35 ? "monthyear" : dayDifference > 7 - ? "date" - : dayDifference > 2 - ? "weekday" - : dayDifference > 0 - ? "datetime" - : "hour", + ? "date" + : dayDifference > 2 + ? "weekday" + : dayDifference > 0 + ? "datetime" + : "hour", minUnit: dayDifference > 35 ? "month" : dayDifference > 2 - ? "day" - : "hour", + ? "day" + : "hour", }, }, y: { @@ -695,8 +695,8 @@ export class HuiEnergyUsageGraphCard type === "used_solar" ? 1 : type === "to_battery" - ? Object.keys(combinedData).length - : idx + 2, + ? Object.keys(combinedData).length + : idx + 2, borderColor: compare ? borderColor + "7F" : borderColor, backgroundColor: compare ? borderColor + "32" : borderColor + "7F", stack: "stack", diff --git a/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts index a74279531a..546f8cf3bd 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts @@ -187,18 +187,18 @@ export class HuiEnergyWaterGraphCard dayDifference > 35 ? "monthyear" : dayDifference > 7 - ? "date" - : dayDifference > 2 - ? "weekday" - : dayDifference > 0 - ? "datetime" - : "hour", + ? "date" + : dayDifference > 2 + ? "weekday" + : dayDifference > 0 + ? "datetime" + : "hour", minUnit: dayDifference > 35 ? "month" : dayDifference > 2 - ? "day" - : "hour", + ? "day" + : "hour", }, offset: true, }, diff --git a/src/panels/lovelace/cards/hui-entity-card.ts b/src/panels/lovelace/cards/hui-entity-card.ts index be1d5102d5..2c8b9bc679 100644 --- a/src/panels/lovelace/cards/hui-entity-card.ts +++ b/src/panels/lovelace/cards/hui-entity-card.ts @@ -167,15 +167,15 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { ` : this.hass.localize("state.default.unknown") : isNumericState(stateObj) || this._config.unit - ? formatNumber( - stateObj.state, - this.hass.locale, - getNumberFormatOptions( - stateObj, - this.hass.entities[this._config.entity] + ? formatNumber( + stateObj.state, + this.hass.locale, + getNumberFormatOptions( + stateObj, + this.hass.entities[this._config.entity] + ) ) - ) - : this.hass.formatEntityState(stateObj)}${showUnit ? html` ` : entityConf.show_last_changed - ? html` - - ` - : this.hass!.formatEntityState(stateObj)} + ? html` + + ` + : this.hass!.formatEntityState(stateObj)} ` : ""} diff --git a/src/panels/lovelace/cards/hui-light-card.ts b/src/panels/lovelace/cards/hui-light-card.ts index 0c45c9f1fd..f7112c8fc1 100644 --- a/src/panels/lovelace/cards/hui-light-card.ts +++ b/src/panels/lovelace/cards/hui-light-card.ts @@ -196,9 +196,8 @@ export class HuiLightCard extends LitElement implements LovelaceCard { } private _dragEvent(e: any): void { - this.shadowRoot!.querySelector( - ".brightness" - )!.innerHTML = `${e.detail.value} %`; + this.shadowRoot!.querySelector(".brightness")!.innerHTML = + `${e.detail.value} %`; this._showBrightness(); this._hideBrightness(); } diff --git a/src/panels/lovelace/cards/hui-markdown-card.ts b/src/panels/lovelace/cards/hui-markdown-card.ts index 858089ed5f..f32bd7b228 100644 --- a/src/panels/lovelace/cards/hui-markdown-card.ts +++ b/src/panels/lovelace/cards/hui-markdown-card.ts @@ -54,9 +54,9 @@ export class HuiMarkdownCard extends LitElement implements LovelaceCard { return this._config === undefined ? 3 : this._config.card_size === undefined - ? Math.round(this._config.content.split("\n").length / 2) + - (this._config.title ? 1 : 0) - : this._config.card_size; + ? Math.round(this._config.content.split("\n").length / 2) + + (this._config.title ? 1 : 0) + : this._config.card_size; } public setConfig(config: MarkdownCardConfig): void { diff --git a/src/panels/lovelace/cards/hui-statistic-card.ts b/src/panels/lovelace/cards/hui-statistic-card.ts index ddf5651450..edbd7c3fe1 100644 --- a/src/panels/lovelace/cards/hui-statistic-card.ts +++ b/src/panels/lovelace/cards/hui-statistic-card.ts @@ -153,8 +153,8 @@ export class HuiStatisticCard extends LitElement implements LovelaceCard { >${this._value === undefined ? "" : this._value === null - ? "?" - : formatNumber(this._value, this.hass.locale)} ${this._config.unit || diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 76de3ee618..4e0407af5a 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -128,9 +128,9 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard { // for one update cycle to force it to rerender to the desired value. stateObj.attributes.min_temp - 1 : stateObj.attributes.temperature !== null && - Number.isFinite(Number(stateObj.attributes.temperature)) - ? stateObj.attributes.temperature - : stateObj.attributes.min_temp; + Number.isFinite(Number(stateObj.attributes.temperature)) + ? stateObj.attributes.temperature + : stateObj.attributes.min_temp; const targetLow = this.resyncSetpoint ? stateObj.attributes.min_temp - 1 diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index d92ece647f..6b9465360f 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -332,8 +332,8 @@ export class HuiTileCard extends LitElement implements LovelaceCard { const localizedState = this._config.hide_state ? nothing : this._config.state_content - ? this._renderStateContent(stateObj, this._config.state_content) - : this._renderState(stateObj); + ? this._renderStateContent(stateObj, this._config.state_content) + : this._renderState(stateObj); const active = stateActive(stateObj); const color = this._computeStateColor(stateObj, this._config.color); diff --git a/src/panels/lovelace/cards/hui-todo-list-card.ts b/src/panels/lovelace/cards/hui-todo-list-card.ts index 6791ec6686..071872e877 100644 --- a/src/panels/lovelace/cards/hui-todo-list-card.ts +++ b/src/panels/lovelace/cards/hui-todo-list-card.ts @@ -365,22 +365,22 @@ export class HuiTodoListCard ` : this.todoListSupportsFeature( - TodoListEntityFeature.DELETE_TODO_ITEM - ) && - !this.todoListSupportsFeature( - TodoListEntityFeature.UPDATE_TODO_ITEM - ) - ? html` - ` - : nothing} + TodoListEntityFeature.DELETE_TODO_ITEM + ) && + !this.todoListSupportsFeature( + TodoListEntityFeature.UPDATE_TODO_ITEM + ) + ? html` + ` + : nothing} ` )} diff --git a/src/panels/lovelace/cards/hui-weather-forecast-card.ts b/src/panels/lovelace/cards/hui-weather-forecast-card.ts index 550adaa13b..248128ece5 100644 --- a/src/panels/lovelace/cards/hui-weather-forecast-card.ts +++ b/src/panels/lovelace/cards/hui-weather-forecast-card.ts @@ -355,20 +355,20 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard { ` : hourly - ? html` - ${formatTime( - new Date(item.datetime), - this.hass!.locale, - this.hass!.config - )} - ` - : html` - ${formatDateWeekdayShort( - new Date(item.datetime), - this.hass!.locale, - this.hass!.config - )} - `} + ? html` + ${formatTime( + new Date(item.datetime), + this.hass!.locale, + this.hass!.config + )} + ` + : html` + ${formatDateWeekdayShort( + new Date(item.datetime), + this.hass!.locale, + this.hass!.config + )} + `} ${this._showValue(item.condition) ? html` @@ -399,8 +399,8 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard { this.hass!.locale )}°` : hourly - ? "" - : "—"} + ? "" + : "—"} ` diff --git a/src/panels/lovelace/components/hui-energy-period-selector.ts b/src/panels/lovelace/components/hui-energy-period-selector.ts index 5a51b570d6..cd526b7c45 100644 --- a/src/panels/lovelace/components/hui-energy-period-selector.ts +++ b/src/panels/lovelace/components/hui-energy-period-selector.ts @@ -210,26 +210,26 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) { ) : formatDate(this._startDate, this.hass.locale, this.hass.config) : simpleRange === "month" - ? formatDateMonthYear( - this._startDate, - this.hass.locale, - this.hass.config - ) - : simpleRange === "year" - ? formatDateYear( - this._startDate, - this.hass.locale, - this.hass.config - ) - : `${formatDateVeryShort( - this._startDate, - this.hass.locale, - this.hass.config - )} – ${formatDateVeryShort( - this._endDate || new Date(), - this.hass.locale, - this.hass.config - )}`} + ? formatDateMonthYear( + this._startDate, + this.hass.locale, + this.hass.config + ) + : simpleRange === "year" + ? formatDateYear( + this._startDate, + this.hass.locale, + this.hass.config + ) + : `${formatDateVeryShort( + this._startDate, + this.hass.locale, + this.hass.config + )} – ${formatDateVeryShort( + this._endDate || new Date(), + this.hass.locale, + this.hass.config + )}`}
    - ` - : this.config.secondary_info === "last-updated" - ? html` - - ` - : this.config.secondary_info === "last-triggered" - ? stateObj.attributes.last_triggered ? html` ` - : this.hass.localize( - "ui.panel.lovelace.cards.entities.never_triggered" - ) - : this.config.secondary_info === "position" && - stateObj.attributes.current_position !== undefined - ? `${this.hass.localize("ui.card.cover.position")}: ${ - stateObj.attributes.current_position - }` - : this.config.secondary_info === "tilt-position" && - stateObj.attributes.current_tilt_position !== undefined - ? `${this.hass.localize( - "ui.card.cover.tilt_position" - )}: ${stateObj.attributes.current_tilt_position}` - : this.config.secondary_info === "brightness" && - stateObj.attributes.brightness - ? html`${Math.round( - (stateObj.attributes.brightness / 255) * 100 - )} - %` - : "")} + : this.config.secondary_info === "last-updated" + ? html` + + ` + : this.config.secondary_info === "last-triggered" + ? stateObj.attributes.last_triggered + ? html` + + ` + : this.hass.localize( + "ui.panel.lovelace.cards.entities.never_triggered" + ) + : this.config.secondary_info === "position" && + stateObj.attributes.current_position !== + undefined + ? `${this.hass.localize( + "ui.card.cover.position" + )}: ${stateObj.attributes.current_position}` + : this.config.secondary_info === + "tilt-position" && + stateObj.attributes.current_tilt_position !== + undefined + ? `${this.hass.localize( + "ui.card.cover.tilt_position" + )}: ${ + stateObj.attributes.current_tilt_position + }` + : this.config.secondary_info === "brightness" && + stateObj.attributes.brightness + ? html`${Math.round( + (stateObj.attributes.brightness / 255) * + 100 + )} + %` + : "")}
    ` : ""} diff --git a/src/panels/lovelace/components/hui-image.ts b/src/panels/lovelace/components/hui-image.ts index 152f990a0d..e71e29340a 100644 --- a/src/panels/lovelace/components/hui-image.ts +++ b/src/panels/lovelace/components/hui-image.ts @@ -200,8 +200,8 @@ export class HuiImage extends LitElement { paddingBottom: useRatio ? `${((100 * this._ratio!.h) / this._ratio!.w).toFixed(2)}%` : this._lastImageHeight === undefined - ? "56.25%" - : undefined, + ? "56.25%" + : undefined, backgroundImage: useRatio && this._loadedImageSrc ? `url("${this._loadedImageSrc}")` @@ -227,21 +227,21 @@ export class HuiImage extends LitElement { > ` : imageSrc === undefined - ? nothing - : html` - - `} + ? nothing + : html` + + `} ${this._loadState === LoadState.Error ? html`
    ` : this.cameraView !== "live" && - (imageSrc === undefined || this._loadState === LoadState.Loading) - ? html`
    - -
    ` - : ""} + (imageSrc === undefined || this._loadState === LoadState.Loading) + ? html`
    + +
    ` + : ""} `; } diff --git a/src/panels/lovelace/editor/card-editor/hui-card-picker.ts b/src/panels/lovelace/editor/card-editor/hui-card-picker.ts index d228aa60f6..230f13845b 100644 --- a/src/panels/lovelace/editor/card-editor/hui-card-picker.ts +++ b/src/panels/lovelace/editor/card-editor/hui-card-picker.ts @@ -363,11 +363,11 @@ export class HuiCardPicker extends LitElement { ${element && element.tagName !== "HUI-ERROR-CARD" ? element : customCard - ? customCard.description || - this.hass!.localize( - `ui.panel.lovelace.editor.cardpicker.no_description` - ) - : description} + ? customCard.description || + this.hass!.localize( + `ui.panel.lovelace.editor.cardpicker.no_description` + ) + : description} `; diff --git a/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts index a8b9442e19..7e49985c40 100644 --- a/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts @@ -253,8 +253,8 @@ export class HuiWeatherForecastCardEditor data.show_current && data.show_forecast ? "show_both" : data.show_current - ? "show_current" - : "show_forecast"; + ? "show_current" + : "show_forecast"; return html` ` : this.config.type === "header" || this.config.type === "footer" - ? html` - - ` - : this.config.type === "tile-feature" - ? html` - - ` - : ""} + ? html` + + ` + : this.config.type === "tile-feature" + ? html` + + ` + : ""} `; } diff --git a/src/panels/lovelace/elements/hui-state-badge-element.ts b/src/panels/lovelace/elements/hui-state-badge-element.ts index 6d6acda5f8..e98c9210d8 100644 --- a/src/panels/lovelace/elements/hui-state-badge-element.ts +++ b/src/panels/lovelace/elements/hui-state-badge-element.ts @@ -56,8 +56,8 @@ export class HuiStateBadgeElement .title=${this._config.title === undefined ? computeStateName(stateObj) : this._config.title === null - ? "" - : this._config.title} + ? "" + : this._config.title} @action=${this._handleAction} .actionHandler=${actionHandler({ hasHold: hasAction(this._config!.hold_action), diff --git a/src/panels/lovelace/entity-rows/hui-input-datetime-entity-row.ts b/src/panels/lovelace/entity-rows/hui-input-datetime-entity-row.ts index 287ea60886..6af9f1f41e 100644 --- a/src/panels/lovelace/entity-rows/hui-input-datetime-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-input-datetime-entity-row.ts @@ -85,8 +85,8 @@ class HuiInputDatetimeEntityRow extends LitElement implements LovelaceRow { .value=${stateObj.state === UNKNOWN ? "" : stateObj.attributes.has_date - ? stateObj.state.split(" ")[1] - : stateObj.state} + ? stateObj.state.split(" ")[1] + : stateObj.state} .locale=${this.hass.locale} .disabled=${isUnavailableState(stateObj.state)} @value-changed=${this._timeChanged} diff --git a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts index 4bb1f65cfb..f0f265a295 100644 --- a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts @@ -204,12 +204,12 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { >
    ` : !supportsFeature(stateObj, MediaPlayerEntityFeature.VOLUME_SET) && - !supportsFeature( - stateObj, - MediaPlayerEntityFeature.VOLUME_BUTTONS - ) - ? buttons - : ""} + !supportsFeature( + stateObj, + MediaPlayerEntityFeature.VOLUME_BUTTONS + ) + ? buttons + : ""} ${supportsFeature(stateObj, MediaPlayerEntityFeature.TURN_OFF) && stateActive(stateObj) ? html` @@ -260,27 +260,27 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { > ` : !this._veryNarrow && - supportsFeature( - stateObj, - MediaPlayerEntityFeature.VOLUME_BUTTONS - ) - ? html` - - - ` - : ""} + supportsFeature( + stateObj, + MediaPlayerEntityFeature.VOLUME_BUTTONS + ) + ? html` + + + ` + : ""}
    ${buttons}
    @@ -312,10 +312,10 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { return stateObj.state === "on" ? { icon: mdiPlayPause, action: "media_play_pause" } : stateObj.state !== "playing" - ? { icon: mdiPlay, action: "media_play" } - : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) - ? { icon: mdiPause, action: "media_pause" } - : { icon: mdiStop, action: "media_stop" }; + ? { icon: mdiPlay, action: "media_play" } + : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) + ? { icon: mdiPause, action: "media_pause" } + : { icon: mdiStop, action: "media_stop" }; } private _togglePower(): void { @@ -337,8 +337,8 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { stateObj.state !== "playing" ? "media_play" : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) - ? "media_pause" - : "media_stop"; + ? "media_pause" + : "media_stop"; this.hass!.callService("media_player", service, { entity_id: this._config!.entity, diff --git a/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts b/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts index 95fce2165c..c73825c355 100644 --- a/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts @@ -163,22 +163,22 @@ class HuiWeatherEntityRow extends LitElement implements LovelaceRow { ${this._config.secondary_info === "entity-id" ? stateObj.entity_id : this._config.secondary_info === "last-changed" - ? html` - - ` - : this._config.secondary_info === "last-updated" - ? html` - - ` - : ""} + ? html` + + ` + : this._config.secondary_info === "last-updated" + ? html` + + ` + : ""} ` : ""} diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 53ba6073a0..eadb8404b3 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -242,45 +242,47 @@ class HUIRoot extends LitElement { ${curViewConfig?.subview ? html`
    ${curViewConfig.title}
    ` : views.filter((view) => !view.subview).length > 1 - ? html` - - ${views.map( - (view) => html` - - e.user === this.hass!.user?.id - )) || - view.visible === false)) - ), - })} - > - ${view.icon - ? html` - - ` - : view.title || "Unnamed view"} - - ` - )} - - ` - : html`
    ${this.config.title}
    `} + ? html` + + ${views.map( + (view) => html` + + e.user === this.hass!.user?.id + )) || + view.visible === false)) + ), + })} + > + ${view.icon + ? html` + + ` + : view.title || "Unnamed view"} + + ` + )} + + ` + : html`
    + ${this.config.title} +
    `}
    ${!this.narrow ? html` diff --git a/src/panels/lovelace/special-rows/hui-attribute-row.ts b/src/panels/lovelace/special-rows/hui-attribute-row.ts index 5fe2f85d3b..d2606f65e7 100644 --- a/src/panels/lovelace/special-rows/hui-attribute-row.ts +++ b/src/panels/lovelace/special-rows/hui-attribute-row.ts @@ -71,16 +71,16 @@ class HuiAttributeRow extends LitElement implements LovelaceRow { capitalize >` : attribute !== undefined - ? html` - - - ` - : "—"} + ? html` + + + ` + : "—"} ${this._config.suffix} `; diff --git a/src/panels/lovelace/special-rows/hui-cast-row.ts b/src/panels/lovelace/special-rows/hui-cast-row.ts index 2cfe87b3d8..35ebe527e8 100644 --- a/src/panels/lovelace/special-rows/hui-cast-row.ts +++ b/src/panels/lovelace/special-rows/hui-cast-row.ts @@ -59,24 +59,24 @@ class HuiCastRow extends LitElement implements LovelaceRow { ${this._noHTTPS ? html` Cast requires HTTPS ` : this._castManager === undefined - ? nothing - : this._castManager === null - ? html` Cast API unavailable ` - : this._castManager.castState === "NO_DEVICES_AVAILABLE" - ? html` No devices found ` - : html` -
    - - - SHOW - -
    - `} + ? nothing + : this._castManager === null + ? html` Cast API unavailable ` + : this._castManager.castState === "NO_DEVICES_AVAILABLE" + ? html` No devices found ` + : html` +
    + + + SHOW + +
    + `}
    `; } diff --git a/src/panels/media-browser/browser-media-player.ts b/src/panels/media-browser/browser-media-player.ts index d8c082f1ac..f0a1556ad7 100644 --- a/src/panels/media-browser/browser-media-player.ts +++ b/src/panels/media-browser/browser-media-player.ts @@ -88,8 +88,8 @@ export class BrowserMediaPlayer { stateObj.state = this.buffering ? "buffering" : this.player.paused || this.player.ended - ? "paused" - : "playing"; + ? "paused" + : "playing"; stateObj.attributes = { media_title: this.item.title, entity_picture: this.item.thumbnail, diff --git a/src/panels/media-browser/ha-bar-media-player.ts b/src/panels/media-browser/ha-bar-media-player.ts index a1e408ac0b..efda587950 100644 --- a/src/panels/media-browser/ha-bar-media-player.ts +++ b/src/panels/media-browser/ha-bar-media-player.ts @@ -184,32 +184,32 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) { const controls: ControlButton[] | undefined = !this.narrow ? computeMediaControls(stateObj, true) : (stateObj.state === "playing" && - (supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) || - supportsFeature(stateObj, MediaPlayerEntityFeature.STOP))) || - ((stateObj.state === "paused" || stateObj.state === "idle") && - supportsFeature(stateObj, MediaPlayerEntityFeature.PLAY)) || - (stateObj.state === "on" && - (supportsFeature(stateObj, MediaPlayerEntityFeature.PLAY) || - supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE))) - ? [ - { - icon: - stateObj.state === "on" - ? mdiPlayPause - : stateObj.state !== "playing" - ? mdiPlay - : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) - ? mdiPause - : mdiStop, - action: - stateObj.state !== "playing" - ? "media_play" - : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) - ? "media_pause" - : "media_stop", - }, - ] - : undefined; + (supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) || + supportsFeature(stateObj, MediaPlayerEntityFeature.STOP))) || + ((stateObj.state === "paused" || stateObj.state === "idle") && + supportsFeature(stateObj, MediaPlayerEntityFeature.PLAY)) || + (stateObj.state === "on" && + (supportsFeature(stateObj, MediaPlayerEntityFeature.PLAY) || + supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE))) + ? [ + { + icon: + stateObj.state === "on" + ? mdiPlayPause + : stateObj.state !== "playing" + ? mdiPlay + : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) + ? mdiPause + : mdiStop, + action: + stateObj.state !== "playing" + ? "media_play" + : supportsFeature(stateObj, MediaPlayerEntityFeature.PAUSE) + ? "media_pause" + : "media_stop", + }, + ] + : undefined; const mediaDescription = computeMediaDescription(stateObj); const mediaDuration = formatMediaTime(stateObj.attributes.media_duration); const mediaTitleClean = cleanupMediaTitle( @@ -275,14 +275,14 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) { ${stateObj.attributes.media_duration === Infinity ? nothing : this.narrow - ? html`` - : html` -
    -
    - -
    ${mediaDuration}
    -
    - `} + ? html`` + : html` +
    +
    + +
    ${mediaDuration}
    +
    + `} `} ${this._renderChoosePlayer(stateObj)} diff --git a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts index 365e70dd1b..ac10b2f91f 100644 --- a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts +++ b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts @@ -54,35 +54,35 @@ export class HuiDialogWebBrowserPlayMedia extends LitElement { ` : mediaType === "video" - ? html` - - ` - : this._params.sourceType === "application/x-mpegURL" - ? html` - - ` - : mediaType === "image" - ? html`${this._params.title` - : html`${this.hass.localize( - "ui.components.media-browser.media_not_supported" - )}`} + ? html` + + ` + : this._params.sourceType === "application/x-mpegURL" + ? html` + + ` + : mediaType === "image" + ? html`${this._params.title` + : html`${this.hass.localize( + "ui.components.media-browser.media_not_supported" + )}`} `; } diff --git a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts index e5e9ff4abe..2371d44fd2 100644 --- a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts +++ b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts @@ -94,34 +94,38 @@ class HaMfaModuleSetupFlow extends LitElement { )} >` : this._step.type === "create_entry" - ? html`

    - ${this.hass.localize( - "ui.panel.profile.mfa_setup.step_done", - "step", - this._step.title - )} -

    ` - : this._step.type === "form" - ? html` + ${this.hass.localize( + "ui.panel.profile.mfa_setup.step_done", + "step", + this._step.title )} - > - ` - : ""}`} +

    ` + : this._step.type === "form" + ? html` + ` + : ""}`} ${["abort", "create_entry"].includes(this._step?.type || "") ? html` diff --git a/src/panels/profile/ha-pick-theme-row.ts b/src/panels/profile/ha-pick-theme-row.ts index 6d8fe0a225..dc1eee7015 100644 --- a/src/panels/profile/ha-pick-theme-row.ts +++ b/src/panels/profile/ha-pick-theme-row.ts @@ -40,8 +40,8 @@ export class HaPickThemeRow extends LitElement { const curTheme = this.hass.selectedTheme?.theme ? this.hass.selectedTheme?.theme : this.hass.themes.darkMode - ? this.hass.themes.default_dark_theme || this.hass.themes.default_theme - : this.hass.themes.default_theme; + ? this.hass.themes.default_dark_theme || this.hass.themes.default_theme + : this.hass.themes.default_theme; const themeSettings = this.hass.selectedTheme; diff --git a/src/types.ts b/src/types.ts index 8d0d37ee86..ee304dbe35 100644 --- a/src/types.ts +++ b/src/types.ts @@ -291,7 +291,7 @@ export type AsyncReturnType any> = T extends ( ) => Promise ? U : T extends (...args: any) => infer U - ? U - : never; + ? U + : never; export type Entries = [keyof T, T[keyof T]][]; diff --git a/src/util/documentation-url.ts b/src/util/documentation-url.ts index baae27a4bf..3e23ef36c4 100644 --- a/src/util/documentation-url.ts +++ b/src/util/documentation-url.ts @@ -5,6 +5,6 @@ export const documentationUrl = (hass: HomeAssistant, path: string) => hass.config.version.includes("b") ? "rc" : hass.config.version.includes("dev") - ? "next" - : "www" + ? "next" + : "www" }.home-assistant.io${path}`; diff --git a/yarn.lock b/yarn.lock index a4b5526c03..52f6e3fb45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9730,7 +9730,7 @@ __metadata: object-hash: "npm:3.0.0" open: "npm:9.1.0" pinst: "npm:3.0.0" - prettier: "npm:3.0.3" + prettier: "npm:3.1.0" proxy-polyfill: "npm:0.3.2" punycode: "npm:2.3.1" qr-scanner: "npm:1.4.2" @@ -13168,12 +13168,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:3.0.3": - version: 3.0.3 - resolution: "prettier@npm:3.0.3" +"prettier@npm:3.1.0": + version: 3.1.0 + resolution: "prettier@npm:3.1.0" bin: prettier: bin/prettier.cjs - checksum: ccf1ead9794b017be6b42d0873f459070beef2069eb393c8b4c0d11aa3430acefc54f6d5f44a5b7ce9af05ad8daf694b912f0aa2808d1c22dfa86e61e9d563f8 + checksum: e95e8f93c6b9aea2ac1e86bebe329bee90c8c50d9a23d1f593eba8d7f39b33b3641eb28785001505b6723c47895a5322ad12a2fb855b289cb7bae450ffc34425 languageName: node linkType: hard