diff --git a/src/components/dialogs/hacs-download-dialog.ts b/src/components/dialogs/hacs-download-dialog.ts index 2806f3a5..c27a9441 100644 --- a/src/components/dialogs/hacs-download-dialog.ts +++ b/src/components/dialogs/hacs-download-dialog.ts @@ -8,8 +8,6 @@ import { mainWindow } from "../../../homeassistant-frontend/src/common/dom/get_m import { computeRTL } from "../../../homeassistant-frontend/src/common/util/compute_rtl"; import "../../../homeassistant-frontend/src/components/ha-alert"; import "../../../homeassistant-frontend/src/components/ha-dialog"; -import "../../../homeassistant-frontend/src/components/ha-form/ha-form"; -import { HaFormSchema } from "../../../homeassistant-frontend/src/components/ha-form/types"; import { showConfirmationDialog } from "../../../homeassistant-frontend/src/dialogs/generic/show-dialog-box"; import type { HomeAssistant } from "../../../homeassistant-frontend/src/types"; import { HacsDispatchEvent } from "../../data/common"; @@ -18,9 +16,8 @@ import { RepositoryBase, repositoryDownloadVersion, RepositoryInfo, - repositorySetVersion, } from "../../data/repository"; -import { repositoryBeta, websocketSubscription } from "../../data/websocket"; +import { websocketSubscription } from "../../data/websocket"; import { HacsStyles } from "../../styles/hacs-common-style"; import { generateFrontendResourceURL, updateFrontendResource } from "../../tools/frontend-resource"; import type { HacsDownloadDialogParams } from "./show-hacs-dialog"; @@ -82,26 +79,6 @@ export class HacsDonwloadDialog extends LitElement { } const installPath = this._getInstallPath(this._repository); - const donwloadRepositorySchema: HaFormSchema[] = [ - { - name: "beta", - selector: { boolean: {} }, - }, - { - name: "version", - selector: { - select: { - options: this._repository.releases.concat( - this._repository.full_name === "hacs/integration" || - this._repository.hide_default_branch - ? [] - : [this._repository.default_branch] - ), - mode: "dropdown", - }, - }, - }, - ]; return html`
- ${this._repository.version_or_commit === "version" - ? html` - - schema.name === "beta" - ? this._dialogParams!.hacs.localize("dialog_download.show_beta") - : this._dialogParams!.hacs.localize("dialog_download.select_version")} - @value-changed=${this._valueChanged} - > - - ` - : nothing} ${!this._repository.can_download ? html` ${this._dialogParams.hacs.localize("confirm.home_assistant_version_not_correct", { @@ -181,29 +138,6 @@ export class HacsDonwloadDialog extends LitElement { `; } - private async _valueChanged(ev) { - let updateNeeded = false; - if (this._repository!.beta !== ev.detail.value.beta) { - updateNeeded = true; - this._waiting = true; - await repositoryBeta(this.hass, this._dialogParams!.repositoryId, ev.detail.value.beta); - } - if (ev.detail.value.version) { - updateNeeded = true; - this._waiting = true; - - await repositorySetVersion( - this.hass, - this._dialogParams!.repositoryId, - ev.detail.value.version - ); - } - if (updateNeeded) { - await this._fetchRepository(); - this._waiting = false; - } - } - private async _installRepository(): Promise { this._installing = true; if (!this._repository) { diff --git a/src/data/repository.ts b/src/data/repository.ts index 2a98783d..ea81f353 100644 --- a/src/data/repository.ts +++ b/src/data/repository.ts @@ -69,14 +69,3 @@ export const repositoryDownloadVersion = async ( repository: repository, version, }); - -export const repositorySetVersion = async ( - hass: HomeAssistant, - repository: string, - version: string -) => - hass.connection.sendMessagePromise({ - type: "hacs/repository/version", - repository: repository, - version, - }); diff --git a/src/data/websocket.ts b/src/data/websocket.ts index c396d2ea..aa90a556 100644 --- a/src/data/websocket.ts +++ b/src/data/websocket.ts @@ -26,13 +26,6 @@ export const repositoryAdd = async (hass: HomeAssistant, repository: string, cat category, }); -export const repositoryBeta = async (hass: HomeAssistant, repository: string, beta: boolean) => - hass.connection.sendMessagePromise({ - type: "hacs/repository/beta", - repository, - show_beta: beta, - }); - export const repositoryUpdate = async (hass: HomeAssistant, repository: string) => hass.connection.sendMessagePromise({ type: "hacs/repository/refresh",