mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 22:06:34 +00:00
Fix some imports (#5619)
This commit is contained in:
parent
a0dae802f2
commit
c468aab9b2
@ -32,6 +32,7 @@ import {
|
||||
import "../../../../src/layouts/loading-screen";
|
||||
import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config";
|
||||
import "./hc-layout";
|
||||
import "@material/mwc-button/mwc-button";
|
||||
|
||||
@customElement("hc-cast")
|
||||
class HcCast extends LitElement {
|
||||
|
@ -24,6 +24,7 @@ import "./hassio-addon-config";
|
||||
import "./hassio-addon-info";
|
||||
import "./hassio-addon-logs";
|
||||
import "./hassio-addon-network";
|
||||
import "../../../src/layouts/hass-subpage";
|
||||
|
||||
@customElement("hassio-addon-view")
|
||||
class HassioAddonView extends LitElement {
|
||||
|
@ -132,7 +132,7 @@ class HassioSnapshots extends LitElement {
|
||||
(addon, idx) => html`
|
||||
<paper-checkbox
|
||||
.idx=${idx}
|
||||
.checked="{{item.checked}}"
|
||||
.checked=${addon.checked}
|
||||
@checked-changed=${this._addonChecked}
|
||||
>
|
||||
${addon.name}
|
||||
@ -202,7 +202,6 @@ class HassioSnapshots extends LitElement {
|
||||
.icon=${snapshot.type === "full"
|
||||
? "hassio:package-variant-closed"
|
||||
: "hassio:package-variant"}
|
||||
.
|
||||
.icon-class="snapshot"
|
||||
></hassio-card-content>
|
||||
</div>
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { HassEntity } from "home-assistant-js-websocket";
|
||||
import { UNAVAILABLE, UNKNOWN } from "../../data/entity";
|
||||
import { atLeastCachedVersion } from "../config/version";
|
||||
import { formatDate } from "../datetime/format_date";
|
||||
import { formatDateTime } from "../datetime/format_date_time";
|
||||
import { formatTime } from "../datetime/format_time";
|
||||
import { LocalizeFunc } from "../translations/localize";
|
||||
import { computeStateDomain } from "./compute_state_domain";
|
||||
import { UNKNOWN, UNAVAILABLE } from "../../data/entity";
|
||||
import { atLeastCachedVersion } from "../config/version";
|
||||
|
||||
const legacyComputeStateDisplay = (
|
||||
localize: LocalizeFunc,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-item/paper-item-body";
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-item/paper-item-body";
|
||||
|
@ -11,8 +11,8 @@ import {
|
||||
LitElement,
|
||||
property,
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
query,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
} from "lit-element";
|
||||
import { classMap } from "lit-html/directives/class-map";
|
||||
import secondsToDuration from "../../common/datetime/seconds_to_duration";
|
||||
import { computeStateDisplay } from "../../common/entity/compute_state_display";
|
||||
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
||||
import { computeStateName } from "../../common/entity/compute_state_name";
|
||||
import { domainIcon } from "../../common/entity/domain_icon";
|
||||
@ -18,7 +19,6 @@ import { stateIcon } from "../../common/entity/state_icon";
|
||||
import { timerTimeRemaining } from "../../common/entity/timer_time_remaining";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import "../ha-label-badge";
|
||||
import { computeStateDisplay } from "../../common/entity/compute_state_display";
|
||||
|
||||
@customElement("ha-state-label-badge")
|
||||
export class HaStateLabelBadge extends LitElement {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-item/paper-item-body";
|
||||
|
@ -4,6 +4,7 @@ import { ripple } from "@material/mwc-ripple/ripple-directive";
|
||||
import { customElement, html, TemplateResult } from "lit-element";
|
||||
import { classMap } from "lit-html/directives/class-map";
|
||||
import type { Constructor } from "../types";
|
||||
import "./ha-icon";
|
||||
|
||||
const MwcFab = customElements.get("mwc-fab") as Constructor<Fab>;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/iron-icon/iron-icon";
|
||||
import "@polymer/paper-checkbox/paper-checkbox";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-item/paper-icon-item";
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import "../paper-time-input";
|
||||
import { HaFormElement, HaFormTimeData, HaFormTimeSchema } from "./ha-form";
|
||||
|
||||
@customElement("ha-form-positive_time_period_dict")
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||
/* eslint-plugin-disable lit */
|
||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||
import LocalizeMixin from "../mixins/localize-mixin";
|
||||
import { computeStateDisplay } from "../common/entity/compute_state_display";
|
||||
import LocalizeMixin from "../mixins/localize-mixin";
|
||||
|
||||
/*
|
||||
* @appliesMixin LocalizeMixin
|
||||
|
@ -17,6 +17,7 @@ import { fireEvent } from "../../common/dom/fire_event";
|
||||
import { compare } from "../../common/string/compare";
|
||||
import { fetchUsers, User } from "../../data/user";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import "./ha-user-badge";
|
||||
|
||||
class HaUserPicker extends LitElement {
|
||||
public hass?: HomeAssistant;
|
||||
|
@ -8,12 +8,12 @@ import {
|
||||
getConfigFlowHandlers,
|
||||
handleConfigFlowStep,
|
||||
} from "../../data/config_flow";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import {
|
||||
DataEntryFlowDialogParams,
|
||||
loadDataEntryFlowDialog,
|
||||
showFlowDialog,
|
||||
} from "./show-dialog-data-entry-flow";
|
||||
import { domainToName } from "../../data/integration";
|
||||
|
||||
export const loadConfigFlowDialog = loadDataEntryFlowDialog;
|
||||
|
||||
|
@ -16,12 +16,12 @@ import { styleMap } from "lit-html/directives/style-map";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import "../../common/search/search-input";
|
||||
import { LocalizeFunc } from "../../common/translations/localize";
|
||||
import "../../components/ha-icon-next";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import { FlowConfig } from "./show-dialog-data-entry-flow";
|
||||
import { configFlowContentStyles } from "./styles";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import { LocalizeFunc } from "../../common/translations/localize";
|
||||
|
||||
interface HandlerObj {
|
||||
name: string;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResultArray,
|
||||
@ -8,11 +9,11 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import "../../components/dialog/ha-paper-dialog";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import { PolymerChangedEvent } from "../../polymer-types";
|
||||
import { haStyleDialog } from "../../resources/styles";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import { HaDomainTogglerDialogParams } from "./show-dialog-domain-toggler";
|
||||
import { domainToName } from "../../data/integration";
|
||||
|
||||
@customElement("dialog-domain-toggler")
|
||||
class DomainTogglerDialog extends LitElement {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import {
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
} from "lit-element";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import "../../../components/ha-attributes";
|
||||
import "../../../components/map/ha-map";
|
||||
import { showZoneEditor } from "../../../data/zone";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import "../../../components/ha-attributes";
|
||||
import { TimerEntity } from "../../../data/timer";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
|
||||
|
@ -1,23 +1,24 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
LitElement,
|
||||
css,
|
||||
html,
|
||||
CSSResult,
|
||||
TemplateResult,
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { computeStateName } from "../../common/entity/compute_state_name";
|
||||
import "../../components/ha-dialog";
|
||||
import "../../components/ha-switch";
|
||||
import { computeDeviceName } from "../../data/device_registry";
|
||||
import { computeStateName } from "../../common/entity/compute_state_name";
|
||||
import { haStyleDialog } from "../../resources/styles";
|
||||
import type { HaSwitch } from "../../components/ha-switch";
|
||||
import { computeDeviceName } from "../../data/device_registry";
|
||||
import { fetchMQTTDebugInfo, MQTTDeviceDebugInfo } from "../../data/mqtt";
|
||||
import { haStyleDialog } from "../../resources/styles";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import { MQTTDeviceDebugInfoDialogParams } from "./show-dialog-mqtt-device-debug-info";
|
||||
import { MQTTDeviceDebugInfo, fetchMQTTDebugInfo } from "../../data/mqtt";
|
||||
import "./mqtt-messages";
|
||||
import "./mqtt-discovery-payload";
|
||||
import "./mqtt-messages";
|
||||
import { MQTTDeviceDebugInfoDialogParams } from "./show-dialog-mqtt-device-debug-info";
|
||||
|
||||
@customElement("dialog-mqtt-device-debug-info")
|
||||
class DialogMQTTDeviceDebugInfo extends LitElement {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {
|
||||
LitElement,
|
||||
html,
|
||||
TemplateResult,
|
||||
customElement,
|
||||
property,
|
||||
} from "lit-element";
|
||||
import { safeDump } from "js-yaml";
|
||||
import {
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
|
||||
@customElement("mqtt-discovery-payload")
|
||||
class MQTTDiscoveryPayload extends LitElement {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {
|
||||
LitElement,
|
||||
html,
|
||||
TemplateResult,
|
||||
customElement,
|
||||
property,
|
||||
} from "lit-element";
|
||||
import { safeDump } from "js-yaml";
|
||||
import {
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { MQTTMessage } from "../../data/mqtt";
|
||||
|
||||
@customElement("mqtt-messages")
|
||||
|
@ -7,11 +7,11 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import { computeStateDisplay } from "../../common/entity/compute_state_display";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import { PersitentNotificationEntity } from "../../data/persistent_notification";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import "./notification-item-template";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import { computeStateDisplay } from "../../common/entity/compute_state_display";
|
||||
|
||||
@customElement("configurator-notification-item")
|
||||
export class HuiConfiguratorNotificationItem extends LitElement {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-tooltip/paper-tooltip";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -8,6 +10,7 @@ import {
|
||||
query,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { navigate } from "../common/navigate";
|
||||
import "../components/data-table/ha-data-table";
|
||||
import type {
|
||||
DataTableColumnContainer,
|
||||
@ -17,9 +20,6 @@ import type {
|
||||
import type { HomeAssistant, Route } from "../types";
|
||||
import "./hass-tabs-subpage";
|
||||
import type { PageNavigation } from "./hass-tabs-subpage";
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import { navigate } from "../common/navigate";
|
||||
import "@polymer/paper-tooltip/paper-tooltip";
|
||||
|
||||
@customElement("hass-tabs-subpage-data-table")
|
||||
export class HaTabsSubpageDataTable extends LitElement {
|
||||
|
@ -16,6 +16,7 @@ import { navigate } from "../common/navigate";
|
||||
import "../components/ha-menu-button";
|
||||
import "../components/ha-paper-icon-button-arrow-prev";
|
||||
import { HomeAssistant, Route } from "../types";
|
||||
import "../components/ha-icon";
|
||||
|
||||
export interface PageNavigation {
|
||||
path: string;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import "@polymer/app-route/app-location";
|
||||
import { html, property, PropertyValues } from "lit-element";
|
||||
import { setHAVersion } from "../common/config/version";
|
||||
import { navigate } from "../common/navigate";
|
||||
import { getStorageDefaultPanelUrlPath } from "../data/panel";
|
||||
import "../resources/custom-card-support";
|
||||
@ -12,7 +13,6 @@ import {
|
||||
} from "../util/register-service-worker";
|
||||
import "./ha-init-page";
|
||||
import "./home-assistant-main";
|
||||
import { setHAVersion } from "../common/config/version";
|
||||
|
||||
export class HomeAssistantAppEl extends HassElement {
|
||||
@property() private _route?: Route;
|
||||
|
@ -24,10 +24,10 @@ import {
|
||||
import { subscribeUser } from "../data/ws-user";
|
||||
import { litLocalizeLiteMixin } from "../mixins/lit-localize-lite-mixin";
|
||||
import { HassElement } from "../state/hass-element";
|
||||
import { HomeAssistant } from "../types";
|
||||
import { registerServiceWorker } from "../util/register-service-worker";
|
||||
import "./onboarding-create-user";
|
||||
import "./onboarding-loading";
|
||||
import { HomeAssistant } from "../types";
|
||||
|
||||
interface OnboardingEvent<T extends ValidOnboardingStep> {
|
||||
type: T;
|
||||
|
@ -20,6 +20,7 @@ import {
|
||||
subscribeConfigFlowInProgress,
|
||||
} from "../data/config_flow";
|
||||
import { DataEntryFlowProgress } from "../data/data_entry_flow";
|
||||
import { domainToName } from "../data/integration";
|
||||
import { onboardIntegrationStep } from "../data/onboarding";
|
||||
import {
|
||||
loadConfigFlowDialog,
|
||||
@ -28,7 +29,6 @@ import {
|
||||
import { HomeAssistant } from "../types";
|
||||
import "./action-badge";
|
||||
import "./integration-badge";
|
||||
import { domainToName } from "../data/integration";
|
||||
|
||||
@customElement("onboarding-integrations")
|
||||
class OnboardingIntegrations extends LitElement {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light";
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-listbox/paper-listbox";
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-listbox/paper-listbox";
|
||||
import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox";
|
||||
@ -7,6 +8,7 @@ import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import "../../../../components/ha-card";
|
||||
import type { Condition } from "../../../../data/automation";
|
||||
import type { HomeAssistant } from "../../../../types";
|
||||
import "../../../../components/ha-yaml-editor";
|
||||
import "./types/ha-automation-condition-and";
|
||||
import "./types/ha-automation-condition-device";
|
||||
import "./types/ha-automation-condition-numeric_state";
|
||||
|
@ -22,12 +22,13 @@ import {
|
||||
subscribeDeviceRegistry,
|
||||
} from "../../../../data/device_registry";
|
||||
import { subscribeEntityRegistry } from "../../../../data/entity_registry";
|
||||
import { domainToName } from "../../../../data/integration";
|
||||
import { SubscribeMixin } from "../../../../mixins/subscribe-mixin";
|
||||
import { PolymerChangedEvent } from "../../../../polymer-types";
|
||||
import { haStyleDialog } from "../../../../resources/styles";
|
||||
import { HomeAssistant } from "../../../../types";
|
||||
import "../../../../components/entity/ha-entity-picker";
|
||||
import { Placeholder, PlaceholderContainer } from "./dialog-thingtalk";
|
||||
import { domainToName } from "../../../../data/integration";
|
||||
|
||||
declare global {
|
||||
// for fire event
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light";
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-listbox/paper-listbox";
|
||||
|
@ -1,17 +1,17 @@
|
||||
import { DeviceRegistryEntry } from "../../../../data/device_registry";
|
||||
import { removeMQTTDeviceEntry } from "../../../../data/mqtt";
|
||||
import {
|
||||
LitElement,
|
||||
html,
|
||||
CSSResult,
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
CSSResult,
|
||||
} from "lit-element";
|
||||
import { DeviceRegistryEntry } from "../../../../data/device_registry";
|
||||
import { removeMQTTDeviceEntry } from "../../../../data/mqtt";
|
||||
import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box";
|
||||
import { showMQTTDeviceDebugInfoDialog } from "../../../../dialogs/mqtt-device-debug-info-dialog/show-dialog-mqtt-device-debug-info";
|
||||
import { HomeAssistant } from "../../../../types";
|
||||
import { haStyle } from "../../../../resources/styles";
|
||||
import { HomeAssistant } from "../../../../types";
|
||||
|
||||
@customElement("ha-device-card-mqtt")
|
||||
export class HaDeviceCardMqtt extends LitElement {
|
||||
|
@ -14,6 +14,7 @@ import {
|
||||
DataTableRowData,
|
||||
RowClickedEvent,
|
||||
} from "../../../components/data-table/ha-data-table";
|
||||
import "../../../components/entity/ha-state-icon";
|
||||
import { AreaRegistryEntry } from "../../../data/area_registry";
|
||||
import { ConfigEntry } from "../../../data/config_entries";
|
||||
import {
|
||||
@ -25,11 +26,10 @@ import {
|
||||
EntityRegistryEntry,
|
||||
findBatteryEntity,
|
||||
} from "../../../data/entity_registry";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||
import "../../../components/entity/ha-state-icon";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
import { configSections } from "../ha-panel-config";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
|
||||
interface DeviceRowData extends DeviceRegistryEntry {
|
||||
device?: DeviceRowData;
|
||||
|
@ -1,4 +1,6 @@
|
||||
import "@polymer/app-layout/app-toolbar/app-toolbar";
|
||||
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-tabs/paper-tab";
|
||||
import "@polymer/paper-tabs/paper-tabs";
|
||||
import { HassEntity } from "home-assistant-js-websocket";
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import { HassEntity } from "home-assistant-js-websocket";
|
||||
import {
|
||||
|
@ -22,7 +22,9 @@ import { computeDomain } from "../../../common/entity/compute_domain";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { domainIcon } from "../../../common/entity/domain_icon";
|
||||
import { stateIcon } from "../../../common/entity/state_icon";
|
||||
import { navigate } from "../../../common/navigate";
|
||||
import "../../../common/search/search-input";
|
||||
import { LocalizeFunc } from "../../../common/translations/localize";
|
||||
import type {
|
||||
DataTableColumnContainer,
|
||||
DataTableColumnData,
|
||||
@ -30,6 +32,7 @@ import type {
|
||||
SelectionChangedEvent,
|
||||
} from "../../../components/data-table/ha-data-table";
|
||||
import "../../../components/ha-icon";
|
||||
import { ConfigEntry, getConfigEntries } from "../../../data/config_entries";
|
||||
import {
|
||||
computeEntityRegistryName,
|
||||
EntityRegistryEntry,
|
||||
@ -37,6 +40,7 @@ import {
|
||||
subscribeEntityRegistry,
|
||||
updateEntityRegistryEntry,
|
||||
} from "../../../data/entity_registry";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||
import "../../../layouts/hass-loading-screen";
|
||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||
@ -49,10 +53,6 @@ import {
|
||||
loadEntityEditorDialog,
|
||||
showEntityEditorDialog,
|
||||
} from "./show-dialog-entity-editor";
|
||||
import { getConfigEntries, ConfigEntry } from "../../../data/config_entries";
|
||||
import { LocalizeFunc } from "../../../common/translations/localize";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import { navigate } from "../../../common/navigate";
|
||||
|
||||
export interface StateEntity extends EntityRegistryEntry {
|
||||
readonly?: boolean;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-item/paper-icon-item";
|
||||
import "@polymer/paper-tooltip/paper-tooltip";
|
||||
import {
|
||||
|
@ -1,5 +1,9 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import type { PaperInputElement } from "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-item/paper-item-body";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,4 +1,6 @@
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-radio-button/paper-radio-button";
|
||||
import "@polymer/paper-radio-group/paper-radio-group";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,17 +1,18 @@
|
||||
import "@polymer/app-route/app-route";
|
||||
import { UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
PropertyValues,
|
||||
LitElement,
|
||||
TemplateResult,
|
||||
html,
|
||||
CSSResult,
|
||||
css,
|
||||
} from "lit-element";
|
||||
import { compare } from "../../../common/string/compare";
|
||||
import { computeRTL } from "../../../common/util/compute_rtl";
|
||||
import { afterNextRender } from "../../../common/util/render-status";
|
||||
import "../../../components/entity/ha-state-icon";
|
||||
import "../../../components/ha-card";
|
||||
import "../../../components/ha-fab";
|
||||
@ -37,6 +38,7 @@ import {
|
||||
EntityRegistryEntry,
|
||||
subscribeEntityRegistry,
|
||||
} from "../../../data/entity_registry";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import { showConfigEntrySystemOptionsDialog } from "../../../dialogs/config-entry-system-options/show-dialog-config-entry-system-options";
|
||||
import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow";
|
||||
import { showOptionsFlowDialog } from "../../../dialogs/config-flow/show-dialog-options-flow";
|
||||
@ -47,11 +49,9 @@ import {
|
||||
} from "../../../dialogs/generic/show-dialog-box";
|
||||
import "../../../layouts/hass-tabs-subpage";
|
||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
import { configSections } from "../ha-panel-config";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import { afterNextRender } from "../../../common/util/render-status";
|
||||
|
||||
@customElement("ha-config-integrations")
|
||||
class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,3 +1,7 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-listbox/paper-listbox";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -8,6 +12,7 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { createCloseHeading } from "../../../../components/ha-dialog";
|
||||
import "../../../../components/ha-paper-dropdown-menu";
|
||||
import {
|
||||
LovelaceResource,
|
||||
LovelaceResourcesMutableParams,
|
||||
|
@ -1,5 +1,3 @@
|
||||
import "@polymer/app-layout/app-header/app-header";
|
||||
import "@polymer/app-layout/app-toolbar/app-toolbar";
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-item/paper-icon-item";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
@ -49,7 +47,6 @@ import {
|
||||
SCENE_IGNORED_DOMAINS,
|
||||
} from "../../../data/scene";
|
||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||
import "../../../layouts/ha-app-layout";
|
||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
@ -187,9 +184,7 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
.backCallback=${() => this._backTapped()}
|
||||
.tabs=${configSections.automation}
|
||||
>
|
||||
|
||||
${
|
||||
this.creatingNew
|
||||
${this.creatingNew
|
||||
? ""
|
||||
: html`
|
||||
<paper-icon-button
|
||||
@ -200,14 +195,8 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
icon="hass:delete"
|
||||
@click=${this._deleteTapped}
|
||||
></paper-icon-button>
|
||||
`
|
||||
}
|
||||
|
||||
${
|
||||
this._errors
|
||||
? html` <div class="errors">${this._errors}</div> `
|
||||
: ""
|
||||
}
|
||||
`}
|
||||
${this._errors ? html` <div class="errors">${this._errors}</div> ` : ""}
|
||||
${this.narrow ? html` <span slot="header">${name}</span> ` : ""}
|
||||
<div
|
||||
id="root"
|
||||
@ -218,9 +207,7 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
<ha-config-section .isWide=${this.isWide}>
|
||||
${!this.narrow ? html` <span slot="header">${name}</span> ` : ""}
|
||||
<div slot="introduction">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.scene.editor.introduction"
|
||||
)}
|
||||
${this.hass.localize("ui.panel.config.scene.editor.introduction")}
|
||||
</div>
|
||||
<ha-card>
|
||||
<div class="card-content">
|
||||
@ -304,8 +291,7 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
</ha-card>
|
||||
</ha-config-section>
|
||||
|
||||
${
|
||||
this.showAdvanced
|
||||
${this.showAdvanced
|
||||
? html`
|
||||
<ha-config-section .isWide=${this.isWide}>
|
||||
<div slot="header">
|
||||
@ -380,21 +366,20 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
</ha-card>
|
||||
</ha-config-section>
|
||||
`
|
||||
: ""
|
||||
}
|
||||
: ""}
|
||||
</div>
|
||||
<ha-fab
|
||||
?is-wide="${this.isWide}"
|
||||
?narrow="${this.narrow}"
|
||||
?dirty="${this._dirty}"
|
||||
?is-wide=${this.isWide}
|
||||
?narrow=${this.narrow}
|
||||
?dirty=${this._dirty}
|
||||
icon="hass:content-save"
|
||||
.title="${this.hass.localize("ui.panel.config.scene.editor.save")}"
|
||||
.title=${this.hass.localize("ui.panel.config.scene.editor.save")}
|
||||
@click=${this._saveScene}
|
||||
class="${classMap({
|
||||
class=${classMap({
|
||||
rtl: computeRTL(this.hass),
|
||||
})}"
|
||||
})}
|
||||
></ha-fab>
|
||||
</ha-app-layout>
|
||||
</hass-tabs-subpage>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "@material/mwc-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-spinner/paper-spinner";
|
||||
import {
|
||||
css,
|
||||
|
@ -36,12 +36,12 @@ import {
|
||||
ZHADevice,
|
||||
ZHAEntityReference,
|
||||
} from "../../../data/zha";
|
||||
import { showZHADeviceZigbeeInfoDialog } from "../../../dialogs/zha-device-zigbee-signature-dialog/show-dialog-zha-device-zigbee-info";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { addEntitiesToLovelaceView } from "../../lovelace/editor/add-entities-to-view";
|
||||
import { formatAsPaddedHex } from "./functions";
|
||||
import { ItemSelectedEvent, NodeServiceData } from "./types";
|
||||
import { showZHADeviceZigbeeInfoDialog } from "../../../dialogs/zha-device-zigbee-signature-dialog/show-dialog-zha-device-zigbee-info";
|
||||
|
||||
declare global {
|
||||
// for fire event
|
||||
|
@ -8,11 +8,12 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import memoizeOne from "memoize-one";
|
||||
import "../../../components/ha-card";
|
||||
import {
|
||||
domainToName,
|
||||
fetchIntegrationManifests,
|
||||
integrationIssuesUrl,
|
||||
IntegrationManifest,
|
||||
fetchIntegrationManifests,
|
||||
domainToName,
|
||||
} from "../../../data/integration";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
|
||||
|
@ -8,12 +8,12 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import "../../../components/ha-card";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import {
|
||||
fetchSystemHealthInfo,
|
||||
SystemHealthInfo,
|
||||
} from "../../../data/system_health";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
|
||||
const sortKeys = (a: string, b: string) => {
|
||||
if (a === "homeassistant") {
|
||||
|
@ -10,9 +10,9 @@ import {
|
||||
import "../../../components/dialog/ha-paper-dialog";
|
||||
import {
|
||||
domainToName,
|
||||
fetchIntegrationManifest,
|
||||
integrationIssuesUrl,
|
||||
IntegrationManifest,
|
||||
fetchIntegrationManifest,
|
||||
} from "../../../data/integration";
|
||||
import { getLoggedErrorIntegration } from "../../../data/system_log";
|
||||
import { PolymerChangedEvent } from "../../../polymer-types";
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -49,7 +50,7 @@ export class HuiEmptyStateCard extends LitElement implements LovelaceCard {
|
||||
</mwc-button>
|
||||
</a>
|
||||
</div>
|
||||
</header-card>
|
||||
</ha-card>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
} from "lit-element";
|
||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { stateIcon } from "../../../common/entity/state_icon";
|
||||
import { isValidEntityId } from "../../../common/entity/valid_entity_id";
|
||||
@ -29,7 +30,6 @@ import {
|
||||
} from "../types";
|
||||
import { HuiErrorCard } from "./hui-error-card";
|
||||
import { EntityCardConfig } from "./types";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
|
||||
@customElement("hui-entity-card")
|
||||
export class HuiEntityCard extends LitElement implements LovelaceCard {
|
||||
|
@ -28,6 +28,7 @@ import { hasAction } from "../common/has-action";
|
||||
import { processConfigEntities } from "../common/process-config-entities";
|
||||
import "../components/hui-warning-element";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import "../components/hui-timestamp-display";
|
||||
import { GlanceCardConfig, GlanceConfigEntity } from "./types";
|
||||
|
||||
@customElement("hui-glance-card")
|
||||
|
@ -14,6 +14,7 @@ import { classMap } from "lit-html/directives/class-map";
|
||||
import { styleMap } from "lit-html/directives/style-map";
|
||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { stateIcon } from "../../../common/entity/state_icon";
|
||||
import { supportsFeature } from "../../../common/entity/supports-feature";
|
||||
@ -30,7 +31,6 @@ import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { LightCardConfig } from "./types";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
|
||||
@customElement("hui-light-card")
|
||||
export class HuiLightCard extends LitElement implements LovelaceCard {
|
||||
|
@ -37,6 +37,7 @@ import { findEntities } from "../common/find-entites";
|
||||
import { processConfigEntities } from "../common/process-config-entities";
|
||||
import { EntityConfig } from "../entity-rows/types";
|
||||
import { LovelaceCard } from "../types";
|
||||
import "../../../components/ha-card";
|
||||
import { MapCardConfig } from "./types";
|
||||
|
||||
@customElement("hui-map-card")
|
||||
|
@ -45,6 +45,7 @@ import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-marquee";
|
||||
import type { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import "../components/hui-warning";
|
||||
import { MediaControlCardConfig } from "./types";
|
||||
|
||||
function getContrastRatio(
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||
import "../../../components/ha-card";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { LovelaceElement, LovelaceElementConfig } from "../elements/types";
|
||||
@ -107,7 +108,7 @@ class HuiPictureElementsCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
return html`
|
||||
<ha-card .header="${this._config.title}">
|
||||
<ha-card .header=${this._config.title}>
|
||||
<div id="root">
|
||||
<hui-image
|
||||
.hass=${this._hass}
|
||||
|
@ -386,7 +386,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
@action=${this._handleAction}
|
||||
.actionHandler=${actionHandler()}
|
||||
tabindex="0"
|
||||
></ha-icon>
|
||||
></paper-icon-button>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -8,31 +8,29 @@ import {
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
|
||||
import "../../../components/ha-icon";
|
||||
import "../../../components/ha-card";
|
||||
import "../components/hui-warning";
|
||||
|
||||
import { WeatherForecastCardConfig } from "./types";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { HomeAssistant, WeatherEntity } from "../../../types";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { isValidEntityId } from "../../../common/entity/valid_entity_id";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { stateIcon } from "../../../common/entity/state_icon";
|
||||
import { isValidEntityId } from "../../../common/entity/valid_entity_id";
|
||||
import { debounce } from "../../../common/util/debounce";
|
||||
import "../../../components/ha-card";
|
||||
import "../../../components/ha-icon";
|
||||
import { UNAVAILABLE } from "../../../data/entity";
|
||||
import {
|
||||
weatherIcons,
|
||||
getSecondaryWeatherAttribute,
|
||||
getWeatherUnit,
|
||||
weatherIcons,
|
||||
weatherImages,
|
||||
} from "../../../data/weather";
|
||||
import { stateIcon } from "../../../common/entity/state_icon";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
import { HomeAssistant, WeatherEntity } from "../../../types";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { WeatherForecastCardConfig } from "./types";
|
||||
|
||||
const DAY_IN_MILLISECONDS = 86400000;
|
||||
|
||||
|
@ -25,6 +25,7 @@ import {
|
||||
EntityRegistryEntry,
|
||||
subscribeEntityRegistry,
|
||||
} from "../../../data/entity_registry";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
import {
|
||||
LovelaceCardConfig,
|
||||
LovelaceConfig,
|
||||
@ -41,7 +42,6 @@ import {
|
||||
} from "../cards/types";
|
||||
import { processEditorEntities } from "../editor/process-editor-entities";
|
||||
import { LovelaceRowConfig, WeblinkConfig } from "../entity-rows/types";
|
||||
import { domainToName } from "../../../data/integration";
|
||||
|
||||
const DEFAULT_VIEW_ENTITY_ID = "group.default_view";
|
||||
const DOMAINS_BADGES = [
|
||||
|
@ -13,6 +13,7 @@ import { classMap } from "lit-html/directives/class-map";
|
||||
import { styleMap } from "lit-html/directives/style-map";
|
||||
import { STATES_OFF } from "../../../common/const";
|
||||
import parseAspectRatio from "../../../common/util/parse-aspect-ratio";
|
||||
import "../../../components/ha-camera-stream";
|
||||
import { fetchThumbnailUrlWithCache } from "../../../data/camera";
|
||||
import { CameraEntity, HomeAssistant } from "../../../types";
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import {
|
||||
css,
|
||||
|
@ -1,4 +1,7 @@
|
||||
import "@material/mwc-button";
|
||||
import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
|
||||
import "@polymer/paper-item/paper-item";
|
||||
import "@polymer/paper-listbox/paper-listbox";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import * as Fuse from "fuse.js";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -11,17 +12,14 @@ import {
|
||||
import { classMap } from "lit-html/directives/class-map";
|
||||
import { until } from "lit-html/directives/until";
|
||||
import memoizeOne from "memoize-one";
|
||||
import * as Fuse from "fuse.js";
|
||||
|
||||
import { CardPickTarget } from "../types";
|
||||
import { LovelaceCard } from "../../types";
|
||||
import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace";
|
||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import "../../../../common/search/search-input";
|
||||
import { UNAVAILABLE_STATES } from "../../../../data/entity";
|
||||
import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace";
|
||||
import {
|
||||
CUSTOM_TYPE_PREFIX,
|
||||
CustomCardEntry,
|
||||
customCards,
|
||||
CUSTOM_TYPE_PREFIX,
|
||||
getCustomCardEntry,
|
||||
} from "../../../../data/lovelace_custom_cards";
|
||||
import { HomeAssistant } from "../../../../types";
|
||||
@ -30,9 +28,9 @@ import {
|
||||
computeUsedEntities,
|
||||
} from "../../common/compute-unused-entities";
|
||||
import { createCardElement } from "../../create-element/create-card-element";
|
||||
import { LovelaceCard } from "../../types";
|
||||
import { getCardStubConfig } from "../get-card-stub-config";
|
||||
|
||||
import "../../../../common/search/search-input";
|
||||
import { CardPickTarget } from "../types";
|
||||
|
||||
interface Card {
|
||||
type: string;
|
||||
|
@ -38,8 +38,9 @@ export class HuiDialogMoveCardView extends LitElement {
|
||||
<hui-views-list
|
||||
.lovelaceConfig=${this._params!.lovelace.config}
|
||||
.selected=${this._params!.path![0]}
|
||||
@view-selected=${this._moveCard}>
|
||||
</hui-view-list>
|
||||
@view-selected=${this._moveCard}
|
||||
>
|
||||
</hui-views-list>
|
||||
</ha-paper-dialog>
|
||||
`;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import {
|
||||
EditorTarget,
|
||||
EntitiesEditorEvent,
|
||||
} from "../types";
|
||||
import "../../../../components/ha-switch";
|
||||
import { configElementStyle } from "./config-elements-style";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "@polymer/paper-tabs";
|
||||
import "@polymer/paper-tabs/paper-tab";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -21,6 +22,7 @@ import {
|
||||
ConfigChangedEvent,
|
||||
HuiCardEditor,
|
||||
} from "../card-editor/hui-card-editor";
|
||||
import "../card-editor/hui-card-picker";
|
||||
import { GUIModeChangedEvent } from "../types";
|
||||
|
||||
const conditionStruct = struct({
|
||||
|
@ -23,6 +23,7 @@ import {
|
||||
entitiesConfigStruct,
|
||||
EntitiesEditorEvent,
|
||||
} from "../types";
|
||||
import "../../../../components/ha-switch";
|
||||
import { configElementStyle } from "./config-elements-style";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
|
@ -1,4 +1,6 @@
|
||||
import "@polymer/paper-icon-button/paper-icon-button";
|
||||
import "@polymer/paper-tabs";
|
||||
import "@polymer/paper-tabs/paper-tab";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -19,6 +21,7 @@ import {
|
||||
ConfigChangedEvent,
|
||||
HuiCardEditor,
|
||||
} from "../card-editor/hui-card-editor";
|
||||
import "../card-editor/hui-card-picker";
|
||||
import { GUIModeChangedEvent } from "../types";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
@ -79,12 +82,11 @@ export class HuiStackCardEditor extends LitElement
|
||||
<paper-tab>
|
||||
<ha-icon icon="hass:plus"></ha-icon>
|
||||
</paper-tab>
|
||||
<paper-tabs>
|
||||
</paper-tabs>
|
||||
</div>
|
||||
|
||||
<div id="editor">
|
||||
${
|
||||
selected < numcards
|
||||
${selected < numcards
|
||||
? html`
|
||||
<div id="card-options">
|
||||
<mwc-button
|
||||
@ -134,8 +136,7 @@ export class HuiStackCardEditor extends LitElement
|
||||
.lovelace=${this.lovelace}
|
||||
@config-changed="${this._handleCardPicked}"
|
||||
></hui-card-picker>
|
||||
`
|
||||
}
|
||||
`}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -8,13 +8,12 @@ import {
|
||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import "../../../../components/entity/ha-entity-picker";
|
||||
import "../../../../components/ha-switch";
|
||||
|
||||
import { EntitiesEditorEvent, EditorTarget } from "../types";
|
||||
import { HomeAssistant } from "../../../../types";
|
||||
import { WeatherForecastCardConfig } from "../../cards/types";
|
||||
import { struct } from "../../common/structs/struct";
|
||||
import "../../components/hui-theme-select-editor";
|
||||
import { LovelaceCardEditor } from "../../types";
|
||||
import { EditorTarget, EntitiesEditorEvent } from "../types";
|
||||
import { configElementStyle } from "./config-elements-style";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "@material/mwc-button";
|
||||
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
|
||||
import "@polymer/paper-spinner/paper-spinner";
|
||||
import {
|
||||
css,
|
||||
|
@ -45,8 +45,9 @@ export class HuiDialogSelectView extends LitElement {
|
||||
<h2>Choose a view</h2>
|
||||
<hui-views-list
|
||||
.lovelaceConfig=${this._params!.lovelaceConfig}
|
||||
@view-selected=${this._selectView}>
|
||||
</hui-view-list>
|
||||
@view-selected=${this._selectView}
|
||||
>
|
||||
</hui-views-list>
|
||||
</ha-paper-dialog>
|
||||
`;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -8,19 +8,21 @@ import {
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
import "../../../components/entity/state-badge";
|
||||
import { UNAVAILABLE_STATES } from "../../../data/entity";
|
||||
import {
|
||||
getSecondaryWeatherAttribute,
|
||||
getWeatherUnit,
|
||||
weatherIcons,
|
||||
weatherImages,
|
||||
getSecondaryWeatherAttribute,
|
||||
} from "../../../data/weather";
|
||||
import { HomeAssistant, WeatherEntity } from "../../../types";
|
||||
import { EntitiesCardEntityConfig } from "../cards/types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceRow } from "./types";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
|
||||
@customElement("hui-weather-entity-row")
|
||||
class HuiWeatherEntityRow extends LitElement implements LovelaceRow {
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import {
|
||||
deleteConfig,
|
||||
fetchConfig,
|
||||
@ -25,7 +26,6 @@ import { loadLovelaceResources } from "./common/load-resources";
|
||||
import { showSaveDialog } from "./editor/show-save-config-dialog";
|
||||
import "./hui-root";
|
||||
import { Lovelace } from "./types";
|
||||
import { domainToName } from "../../data/integration";
|
||||
|
||||
(window as any).loadCardHelpers = () => import("./custom-card-helpers");
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import "@polymer/paper-spinner/paper-spinner";
|
||||
import { HassEntity } from "home-assistant-js-websocket";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -8,16 +10,13 @@ import {
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { fetchRecent } from "../../../data/history";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { HassEntity } from "home-assistant-js-websocket";
|
||||
|
||||
import "@polymer/paper-spinner/paper-spinner";
|
||||
import { coordinates } from "../common/graph/coordinates";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-graph-base";
|
||||
import { LovelaceHeaderFooter } from "../types";
|
||||
import { GraphHeaderFooterConfig } from "./types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { fetchRecent } from "../../../data/history";
|
||||
import { coordinates } from "../common/graph/coordinates";
|
||||
|
||||
const MINUTE = 60000;
|
||||
const DAY = 86400000;
|
||||
|
@ -28,6 +28,7 @@ import { computeRTLDirection } from "../../common/util/compute_rtl";
|
||||
import { debounce } from "../../common/util/debounce";
|
||||
import { afterNextRender } from "../../common/util/render-status";
|
||||
import "../../components/ha-icon";
|
||||
import "../../components/ha-menu-button";
|
||||
import "../../components/ha-paper-icon-button-arrow-next";
|
||||
import "../../components/ha-paper-icon-button-arrow-prev";
|
||||
import type { LovelaceConfig, LovelacePanelConfig } from "../../data/lovelace";
|
||||
@ -82,11 +83,16 @@ class HUIRoot extends LitElement {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-app-layout id="layout">
|
||||
<app-header slot="header" effects="waterfall" class=${classMap({
|
||||
<app-header
|
||||
slot="header"
|
||||
effects="waterfall"
|
||||
class=${classMap({
|
||||
"edit-mode": this._editMode,
|
||||
})} fixed condenses>
|
||||
${
|
||||
this._editMode
|
||||
})}
|
||||
fixed
|
||||
condenses
|
||||
>
|
||||
${this._editMode
|
||||
? html`
|
||||
<app-toolbar class="edit-mode">
|
||||
<paper-icon-button
|
||||
@ -263,11 +269,8 @@ class HUIRoot extends LitElement {
|
||||
</paper-listbox>
|
||||
</paper-menu-button>
|
||||
</app-toolbar>
|
||||
`
|
||||
}
|
||||
|
||||
${
|
||||
this.lovelace!.config.views.length > 1 || this._editMode
|
||||
`}
|
||||
${this.lovelace!.config.views.length > 1 || this._editMode
|
||||
? html`
|
||||
<div sticky>
|
||||
<paper-tabs
|
||||
@ -352,14 +355,17 @@ class HUIRoot extends LitElement {
|
||||
</paper-tabs>
|
||||
</div>
|
||||
`
|
||||
: ""
|
||||
}
|
||||
: ""}
|
||||
</app-header>
|
||||
<div id='view' class="${classMap({
|
||||
<div
|
||||
id="view"
|
||||
class="${classMap({
|
||||
"tabs-hidden":
|
||||
!this._editMode && this.lovelace!.config.views.length < 2,
|
||||
})}" @ll-rebuild='${this._debouncedConfigChanged}'></div>
|
||||
</app-header-layout>
|
||||
})}"
|
||||
@ll-rebuild="${this._debouncedConfigChanged}"
|
||||
></div>
|
||||
</ha-app-layout>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
|
@ -1,16 +1,14 @@
|
||||
import {
|
||||
html,
|
||||
LitElement,
|
||||
TemplateResult,
|
||||
customElement,
|
||||
property,
|
||||
css,
|
||||
CSSResult,
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
|
||||
import { LovelaceRow, TextConfig } from "../entity-rows/types";
|
||||
|
||||
import "../../../components/ha-icon";
|
||||
import { LovelaceRow, TextConfig } from "../entity-rows/types";
|
||||
|
||||
@customElement("hui-text-row")
|
||||
class HuiTextRow extends LitElement implements LovelaceRow {
|
||||
|
@ -8,11 +8,13 @@ import {
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import "../../components/ha-card";
|
||||
import "../../components/ha-switch";
|
||||
import {
|
||||
CoreFrontendUserData,
|
||||
getOptimisticFrontendUserDataCollection,
|
||||
} from "../../data/frontend";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import "./ha-settings-row";
|
||||
|
||||
@customElement("ha-advanced-mode-row")
|
||||
class AdvancedModeRow extends LitElement {
|
||||
|
@ -3,9 +3,9 @@ import "@polymer/iron-flex-layout/iron-flex-layout-classes";
|
||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||
/* eslint-plugin-disable lit */
|
||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||
import { computeStateDisplay } from "../common/entity/compute_state_display";
|
||||
import "../components/entity/state-info";
|
||||
import LocalizeMixin from "../mixins/localize-mixin";
|
||||
import { computeStateDisplay } from "../common/entity/compute_state_display";
|
||||
|
||||
/*
|
||||
* @appliesMixin LocalizeMixin
|
||||
|
@ -2,10 +2,10 @@ import "@polymer/iron-flex-layout/iron-flex-layout-classes";
|
||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||
/* eslint-plugin-disable lit */
|
||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||
import { computeStateDisplay } from "../common/entity/compute_state_display";
|
||||
import "../components/entity/state-info";
|
||||
import LocalizeMixin from "../mixins/localize-mixin";
|
||||
import HassMediaPlayerEntity from "../util/hass-media-player-model";
|
||||
import { computeStateDisplay } from "../common/entity/compute_state_display";
|
||||
|
||||
/*
|
||||
* @appliesMixin LocalizeMixin
|
||||
|
@ -1,10 +1,12 @@
|
||||
import { atLeastVersion } from "../common/config/version";
|
||||
import { computeLocalize } from "../common/translations/localize";
|
||||
import { computeRTL } from "../common/util/compute_rtl";
|
||||
import { debounce } from "../common/util/debounce";
|
||||
import {
|
||||
getHassTranslations,
|
||||
getHassTranslationsPre109,
|
||||
saveTranslationPreferences,
|
||||
TranslationCategory,
|
||||
getHassTranslationsPre109,
|
||||
} from "../data/translation";
|
||||
import { translationMetadata } from "../resources/translations-metadata";
|
||||
import { Constructor, HomeAssistant } from "../types";
|
||||
@ -15,8 +17,6 @@ import {
|
||||
getUserLanguage,
|
||||
} from "../util/hass-translation";
|
||||
import { HassBaseEl } from "./hass-base-mixin";
|
||||
import { atLeastVersion } from "../common/config/version";
|
||||
import { debounce } from "../common/util/debounce";
|
||||
|
||||
interface LoadedTranslationCategory {
|
||||
// individual integrations loaded for this category
|
||||
|
@ -10,8 +10,8 @@ import {
|
||||
} from "home-assistant-js-websocket";
|
||||
import { LocalizeFunc } from "./common/translations/localize";
|
||||
import { CoreFrontendUserData } from "./data/frontend";
|
||||
import { ExternalMessaging } from "./external_app/external_messaging";
|
||||
import { getHassTranslations } from "./data/translation";
|
||||
import { ExternalMessaging } from "./external_app/external_messaging";
|
||||
|
||||
declare global {
|
||||
/* eslint-disable no-var, no-redeclare */
|
||||
|
Loading…
x
Reference in New Issue
Block a user