diff --git a/cast/src/receiver/second-load.ts b/cast/src/receiver/second-load.ts index e3c0885561d5..97de839a76ff 100644 --- a/cast/src/receiver/second-load.ts +++ b/cast/src/receiver/second-load.ts @@ -1,4 +1,3 @@ -import "web-animations-js/web-animations-next-lite.min"; import "../../../src/resources/ha-style"; import "../../../src/resources/roboto"; import "./layout/hc-lovelace"; diff --git a/gallery/src/components/demo-cards.ts b/gallery/src/components/demo-cards.ts index fa91ca209769..d2c485e76ede 100644 --- a/gallery/src/components/demo-cards.ts +++ b/gallery/src/components/demo-cards.ts @@ -78,6 +78,9 @@ class DemoCards extends LitElement { ha-formfield { margin-right: 16px; } + #container { + background-color: var(--primary-background-color); + } `; } diff --git a/gallery/src/components/page-description.ts b/gallery/src/components/page-description.ts index 8e449195a63f..e9680e59b380 100644 --- a/gallery/src/components/page-description.ts +++ b/gallery/src/components/page-description.ts @@ -12,7 +12,14 @@ class PageDescription extends HaMarkdown { if (!PAGES[this.page].description) { return html``; } + return html` +
- ${this.hass.localize( - "ui.panel.config.ozw.refresh_node.complete" - )} -
-- - ${this.hass.localize( - "ui.panel.config.ozw.refresh_node.refreshing_description" - )} - -
- ${this._node - ? html` -- ${this.hass.localize( - "ui.panel.config.ozw.refresh_node.node_status" - )}: - ${this._node.node_query_stage} - (${this.hass.localize( - "ui.panel.config.ozw.refresh_node.step" - )} - ${nodeQueryStages.indexOf( - this._node.node_query_stage - ) + 1}/17) -
-- - ${this.hass.localize( - "ui.panel.config.ozw.node_query_stages." + - this._node.node_query_stage.toLowerCase() - )} -
- ` - : ``} -- ${this.hass.localize( - "ui.panel.config.ozw.refresh_node.battery_note" - )} -
- `} - ${this._nodeMetaData?.WakeupHelp !== "" - ? html` - - ${this.hass.localize( - "ui.panel.config.ozw.refresh_node.wakeup_header" - )} - ${this._nodeMetaData!.Name} - -- ${this._nodeMetaData!.WakeupHelp} -- ` - : ""} - ${!this._active - ? html` -
- - ${this.hass.localize( - "ui.panel.config.ozw.refresh_node.wakeup_instructions_source" - )} - -
- - ${this.hass.localize( - "ui.panel.config.ozw.node_config.help_source" - )} - -
-- Note: This panel is currently read-only. The ability to change - values will come in a later update. -
-- ${this.hass.localize( - "ui.panel.config.ozw.node_metadata.product_manual" - )} -
- ` - : ``} -${this._metadata.metadata.WakeupHelp}
-${item.value}
-Product Manual
- ` - : ``} -[[_ozwLog]]-
${this._ozwLogs}`;
- return ozwWindow;
- }
-
- async _refreshLog(ozwWindow) {
- if (ozwWindow.closed === true) {
- clearInterval(this._intervalId);
- this.setProperties({ _intervalId: null });
- } else {
- const info = await this.hass.callApi(
- "GET",
- "zwave/ozwlog?lines=" + this.numLogLines
- );
- this.setProperties({ _ozwLogs: info });
- ozwWindow.document.body.innerHTML = `${this._ozwLogs}`;
- }
- }
-
- _isCompleteLog() {
- if (this.numLogLines !== "0") {
- this.setProperties({ _completeLog: false });
- } else {
- this.setProperties({ _completeLog: true });
- }
- }
-
- connectedCallback() {
- super.connectedCallback();
- if (!registeredDialog) {
- registeredDialog = true;
- this.fire("register-dialog", {
- dialogShowEvent: "show-ozwlog-dialog",
- dialogTag: "zwave-log-dialog",
- dialogImport: () => import("./zwave-log-dialog"),
- });
- }
- }
-
- _showOzwlogDialog() {
- this.fire("show-ozwlog-dialog", {
- hass: this.hass,
- _numLogLines: this.numLogLines,
- _ozwLog: this._ozwLogs,
- _tail: this.tail,
- dialogClosedCallback: () => this._dialogClosed(),
- });
- }
-
- _dialogClosed() {
- this.setProperties({
- tail: false,
- });
- }
-}
-customElements.define("ozw-log", OzwLog);
diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts
deleted file mode 100644
index 2272bd884e94..000000000000
--- a/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts
+++ /dev/null
@@ -1,573 +0,0 @@
-import "@material/mwc-button/mwc-button";
-import "@polymer/app-layout/app-header/app-header";
-import "@polymer/app-layout/app-toolbar/app-toolbar";
-import { UnsubscribeFunc } from "home-assistant-js-websocket";
-import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
-import { customElement, property, state } from "lit/decorators";
-import { isComponentLoaded } from "../../../../../common/config/is_component_loaded";
-import { computeStateDomain } from "../../../../../common/entity/compute_state_domain";
-import { computeStateName } from "../../../../../common/entity/compute_state_name";
-import "../../../../../components/buttons/ha-call-api-button";
-import "../../../../../components/buttons/ha-call-service-button";
-import "../../../../../components/ha-alert";
-import "../../../../../components/ha-card";
-import "../../../../../components/ha-circular-progress";
-import "../../../../../components/ha-icon";
-import "../../../../../components/ha-icon-button";
-import {
- computeDeviceName,
- DeviceRegistryEntry,
- fetchDeviceRegistry,
- subscribeDeviceRegistry,
-} from "../../../../../data/device_registry";
-import {
- fetchMigrationConfig,
- fetchNetworkStatus,
- startZwaveJsConfigFlow,
- ZWaveMigrationConfig,
- ZWaveNetworkStatus,
- ZWAVE_NETWORK_STATE_STOPPED,
-} from "../../../../../data/zwave";
-import {
- fetchZwaveNetworkStatus as fetchZwaveJsNetworkStatus,
- fetchZwaveNodeStatus,
- getZwaveJsIdentifiersFromDevice,
- migrateZwave,
- subscribeZwaveNodeReady,
- ZWaveJsMigrationData,
-} from "../../../../../data/zwave_js";
-import { showConfigFlowDialog } from "../../../../../dialogs/config-flow/show-dialog-config-flow";
-import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box";
-import "../../../../../layouts/hass-subpage";
-import { haStyle } from "../../../../../resources/styles";
-import type { HomeAssistant, Route } from "../../../../../types";
-import "../../../ha-config-section";
-
-@customElement("zwave-migration")
-export class ZwaveMigration extends LitElement {
- @property({ type: Object }) public hass!: HomeAssistant;
-
- @property({ type: Object }) public route!: Route;
-
- @property({ type: Boolean }) public narrow!: boolean;
-
- @property({ type: Boolean }) public isWide!: boolean;
-
- @state() private _networkStatus?: ZWaveNetworkStatus;
-
- @state() private _step = 0;
-
- @state() private _stoppingNetwork = false;
-
- @state() private _migrationConfig?: ZWaveMigrationConfig;
-
- @state() private _migrationData?: ZWaveJsMigrationData;
-
- @state() private _migratedZwaveEntities?: string[];
-
- @state() private _deviceNameLookup: { [id: string]: string } = {};
-
- @state() private _waitingOnDevices?: DeviceRegistryEntry[];
-
- private _zwaveJsEntryId?: string;
-
- private _nodeReadySubscriptions?: Promise- This wizard will walk through the following steps to - migrate from the legacy Z-Wave integration to Z-Wave JS. -
-- - ${isComponentLoaded(this.hass, "hassio") - ? html`Please - make a backup - before proceeding.` - : "Please make a backup of your installation before proceeding."} - -
-- We need to stop the Z-Wave network to perform the - migration. Home Assistant will not be able to control - Z-Wave devices while the network is stopped. -
- ${Object.values(this.hass.states) - .filter( - (entityState) => - computeStateDomain(entityState) === "zwave" && - !["ready", "sleeping"].includes(entityState.state) - ) - .map( - (entityState) => - html`Stopping Z-Wave Network...
Now it's time to set up the Z-Wave JS integration.
- ${isComponentLoaded(this.hass, "hassio") - ? html` -- Z-Wave JS runs as a Home Assistant add-on that - will be setup next. Make sure to check the - checkbox to use the add-on. -
- ` - : html` -- You are not running Home Assistant OS (the default - installation type) or Home Assistant Supervised, - so we can not setup Z-Wave JS automaticaly. Follow - the - advanced installation instructions - to install Z-Wave JS. -
-- Here's the current Z-Wave configuration. You'll - need these values when setting up Z-Wave JS. -
- ${this._migrationConfig - ? html`- USB Path: ${this._migrationConfig.usb_path}` - : ``} -
- Network Key: - ${this._migrationConfig.network_key} -
- Once Z-Wave JS is installed and running, click - 'Continue' to set up the Z-Wave JS integration and - migrate your devices and entities. -
- `} -- Now it's time to migrate your devices and entities from - the legacy Z-Wave integration to the Z-Wave JS - integration, to make sure all your UI's and automations - keep working. -
- ${this._waitingOnDevices?.map( - (device) => - html`Below is a list of what will be migrated.
- ${this._migratedZwaveEntities!.length !== - this._migrationData.zwave_entity_ids.length - ? html`Loading migration data...
-- If you have 'zwave' in your configurtion.yaml file, you - should remove it now. -
-- - ${this.hass!.localize("ui.panel.config.zwave.learn_more")} - -
-Ascii: [[_computedCodeOutput]]-