mirror of
https://github.com/home-assistant/frontend.git
synced 2025-09-02 13:00:27 +00:00
Compare commits
1 Commits
restore-co
...
upgrade-we
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8ecd54ddf2 |
@@ -20,7 +20,10 @@ module.exports.emptyPackages = ({ latestBuild }) =>
|
||||
// Loads stuff from a CDN
|
||||
require.resolve("@polymer/font-roboto/roboto.js"),
|
||||
require.resolve("@vaadin/vaadin-material-styles/font-roboto.js"),
|
||||
// Polyfill only needed for ES5 workers so filter out in latestBuild
|
||||
// Compatibility not needed for latest builds
|
||||
latestBuild &&
|
||||
path.resolve(paths.polymer_dir, "src/entrypoints/compatibility.ts"),
|
||||
// This polyfill is loaded in workers to support ES5, filter it out.
|
||||
latestBuild && require.resolve("proxy-polyfill/src/index.js"),
|
||||
].filter(Boolean);
|
||||
|
||||
@@ -112,7 +115,6 @@ module.exports.config = {
|
||||
authorize: "./src/entrypoints/authorize.ts",
|
||||
onboarding: "./src/entrypoints/onboarding.ts",
|
||||
core: "./src/entrypoints/core.ts",
|
||||
compatibility: "./src/entrypoints/compatibility.ts",
|
||||
"custom-panel": "./src/entrypoints/custom-panel.ts",
|
||||
},
|
||||
outputPath: outputPath(paths.app_output_root, latestBuild),
|
||||
@@ -127,10 +129,6 @@ module.exports.config = {
|
||||
return {
|
||||
entry: {
|
||||
main: path.resolve(paths.demo_dir, "src/entrypoint.ts"),
|
||||
compatibility: path.resolve(
|
||||
paths.polymer_dir,
|
||||
"src/entrypoints/compatibility.ts"
|
||||
),
|
||||
},
|
||||
outputPath: outputPath(paths.demo_output_root, latestBuild),
|
||||
publicPath: publicPath(latestBuild),
|
||||
|
@@ -1,36 +1,39 @@
|
||||
const del = require("del");
|
||||
const gulp = require("gulp");
|
||||
const paths = require("../paths");
|
||||
const config = require("../paths");
|
||||
require("./translations");
|
||||
|
||||
gulp.task(
|
||||
"clean",
|
||||
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
|
||||
return del([paths.app_output_root, paths.build_dir]);
|
||||
return del([config.app_output_root, config.build_dir]);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-demo",
|
||||
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
|
||||
return del([paths.demo_output_root, paths.build_dir]);
|
||||
return del([config.demo_output_root, config.build_dir]);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-cast",
|
||||
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
|
||||
return del([paths.cast_output_root, paths.build_dir]);
|
||||
return del([config.cast_output_root, config.build_dir]);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task("clean-hassio", function cleanOutputAndBuildDir() {
|
||||
return del([paths.hassio_output_root, paths.build_dir]);
|
||||
});
|
||||
gulp.task(
|
||||
"clean-hassio",
|
||||
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
|
||||
return del([config.hassio_output_root, config.build_dir]);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-gallery",
|
||||
gulp.parallel("clean-translations", function cleanOutputAndBuildDir() {
|
||||
return del([paths.gallery_output_root, paths.build_dir]);
|
||||
return del([config.gallery_output_root, config.build_dir]);
|
||||
})
|
||||
);
|
||||
|
@@ -53,7 +53,6 @@ gulp.task("gen-pages-dev", (done) => {
|
||||
const content = renderTemplate(page, {
|
||||
latestPageJS: `/frontend_latest/${page}.js`,
|
||||
|
||||
es5Compatibility: "/frontend_es5/compatibility.js",
|
||||
es5PageJS: `/frontend_es5/${page}.js`,
|
||||
});
|
||||
|
||||
@@ -79,7 +78,6 @@ gulp.task("gen-pages-prod", (done) => {
|
||||
const content = renderTemplate(page, {
|
||||
latestPageJS: latestManifest[`${page}.js`],
|
||||
|
||||
es5Compatibility: es5Manifest["compatibility.js"],
|
||||
es5PageJS: es5Manifest[`${page}.js`],
|
||||
});
|
||||
|
||||
@@ -99,7 +97,6 @@ gulp.task("gen-index-app-dev", (done) => {
|
||||
latestCoreJS: "/frontend_latest/core.js",
|
||||
latestCustomPanelJS: "/frontend_latest/custom-panel.js",
|
||||
|
||||
es5Compatibility: "/frontend_es5/compatibility.js",
|
||||
es5AppJS: "/frontend_es5/app.js",
|
||||
es5CoreJS: "/frontend_es5/core.js",
|
||||
es5CustomPanelJS: "/frontend_es5/custom-panel.js",
|
||||
@@ -123,7 +120,6 @@ gulp.task("gen-index-app-prod", (done) => {
|
||||
latestCoreJS: latestManifest["core.js"],
|
||||
latestCustomPanelJS: latestManifest["custom-panel.js"],
|
||||
|
||||
es5Compatibility: es5Manifest["compatibility.js"],
|
||||
es5AppJS: es5Manifest["app.js"],
|
||||
es5CoreJS: es5Manifest["core.js"],
|
||||
es5CustomPanelJS: es5Manifest["custom-panel.js"],
|
||||
@@ -210,7 +206,6 @@ gulp.task("gen-index-demo-dev", (done) => {
|
||||
const content = renderDemoTemplate("index", {
|
||||
latestDemoJS: "/frontend_latest/main.js",
|
||||
|
||||
es5Compatibility: "/frontend_es5/compatibility.js",
|
||||
es5DemoJS: "/frontend_es5/main.js",
|
||||
});
|
||||
|
||||
@@ -233,7 +228,6 @@ gulp.task("gen-index-demo-prod", (done) => {
|
||||
const content = renderDemoTemplate("index", {
|
||||
latestDemoJS: latestManifest["main.js"],
|
||||
|
||||
es5Compatibility: es5Manifest["compatibility.js"],
|
||||
es5DemoJS: es5Manifest["main.js"],
|
||||
});
|
||||
const minified = minifyHtml(content);
|
||||
|
@@ -92,11 +92,7 @@ gulp.task("rollup-watch-app", () => {
|
||||
});
|
||||
|
||||
gulp.task("rollup-watch-hassio", () => {
|
||||
watchRollup(
|
||||
// Force latestBuild = false for hassio config.
|
||||
(conf) => rollupConfig.createHassioConfig({ ...conf, latestBuild: false }),
|
||||
["hassio/src/**"]
|
||||
);
|
||||
watchRollup(rollupConfig.createHassioConfig, ["hassio/src/**"]);
|
||||
});
|
||||
|
||||
gulp.task("rollup-dev-server-demo", () => {
|
||||
|
@@ -14,32 +14,6 @@ module.exports = function (userOptions = {}) {
|
||||
|
||||
return {
|
||||
name: "ignore",
|
||||
resolveId(importee, importer) {
|
||||
// Only use ignore to intercept imports that we don't control
|
||||
// inside node_module dependencies.
|
||||
if (
|
||||
importee.endsWith("commonjsHelpers.js") ||
|
||||
importee.endsWith("rollupPluginBabelHelpers.js") ||
|
||||
importee.endsWith("?commonjs-proxy") ||
|
||||
!importer ||
|
||||
!importer.includes("/node_modules/")
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
let fullPath;
|
||||
try {
|
||||
fullPath = importee.startsWith(".")
|
||||
? path.resolve(importee, importer)
|
||||
: require.resolve(importee);
|
||||
} catch (err) {
|
||||
console.error("Error in ignore plugin", { importee, importer }, err);
|
||||
throw err;
|
||||
}
|
||||
|
||||
return files.some((toIgnorePath) => fullPath.startsWith(toIgnorePath))
|
||||
? fullPath
|
||||
: null;
|
||||
},
|
||||
|
||||
load(id) {
|
||||
return files.some((toIgnorePath) => id.startsWith(toIgnorePath))
|
||||
|
@@ -82,7 +82,6 @@ export class HcMain extends HassElement {
|
||||
.hass=${this.hass}
|
||||
.lovelaceConfig=${this._lovelaceConfig}
|
||||
.viewPath=${this._lovelacePath}
|
||||
@config-refresh=${this._generateLovelaceConfig}
|
||||
></hc-lovelace>
|
||||
`;
|
||||
}
|
||||
@@ -194,7 +193,12 @@ export class HcMain extends HassElement {
|
||||
} catch (err) {
|
||||
// Generate a Lovelace config.
|
||||
this._unsubLovelace = () => undefined;
|
||||
await this._generateLovelaceConfig();
|
||||
const { generateLovelaceConfigFromHass } = await import(
|
||||
"../../../../src/panels/lovelace/common/generate-lovelace-config"
|
||||
);
|
||||
this._handleNewLovelaceConfig(
|
||||
await generateLovelaceConfigFromHass(this.hass!)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!resourcesLoaded) {
|
||||
@@ -214,15 +218,6 @@ export class HcMain extends HassElement {
|
||||
this._sendStatus();
|
||||
}
|
||||
|
||||
private async _generateLovelaceConfig() {
|
||||
const { generateLovelaceConfigFromHass } = await import(
|
||||
"../../../../src/panels/lovelace/common/generate-lovelace-config"
|
||||
);
|
||||
this._handleNewLovelaceConfig(
|
||||
await generateLovelaceConfigFromHass(this.hass!)
|
||||
);
|
||||
}
|
||||
|
||||
private _handleNewLovelaceConfig(lovelaceConfig: LovelaceConfig) {
|
||||
castContext.setApplicationState(lovelaceConfig.title!);
|
||||
this._lovelaceConfig = lovelaceConfig;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import "../../src/resources/compatibility";
|
||||
import { isNavigationClick } from "../../src/common/dom/is-navigation-click";
|
||||
import { navigate } from "../../src/common/navigate";
|
||||
import {
|
||||
|
@@ -5,6 +5,18 @@
|
||||
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
|
||||
<link rel="icon" href="/static/icons/favicon.ico" />
|
||||
<link rel="mask-icon" href="/static/icons/mask-icon.svg" color="#03a9f4" />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Medium.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
@@ -84,7 +96,6 @@
|
||||
<div id="ha-init-skeleton"></div>
|
||||
<ha-demo></ha-demo>
|
||||
<%= renderTemplate('_js_base') %>
|
||||
<%= renderTemplate('_preload_roboto') %>
|
||||
|
||||
<script type="module" src="<%= latestDemoJS %>"></script>
|
||||
|
||||
@@ -95,12 +106,9 @@
|
||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
||||
<% if (useRollup) { %>
|
||||
_ls("/static/js/s.min.js").onload = function() {
|
||||
System.import("<%= es5Compatibility %>").then(function() {
|
||||
System.import("<%= es5DemoJS %>");
|
||||
});
|
||||
System.import("<%= es5DemoJS %>");
|
||||
};
|
||||
<% } else { %>
|
||||
_ls("<%= es5Compatibility %>");
|
||||
_ls("<%= es5DemoJS %>");
|
||||
<% } %>
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@
|
||||
"@thomasloven/round-slider": "0.5.0",
|
||||
"@vaadin/vaadin-combo-box": "^5.0.10",
|
||||
"@vaadin/vaadin-date-picker": "^4.0.7",
|
||||
"@webcomponents/webcomponentsjs": "^2.2.7",
|
||||
"@webcomponents/webcomponentsjs": "^2.3.4",
|
||||
"chart.js": "~2.8.0",
|
||||
"chartjs-chart-timeline": "^0.3.0",
|
||||
"codemirror": "^5.49.0",
|
||||
@@ -89,7 +89,7 @@
|
||||
"fuse.js": "^6.0.0",
|
||||
"google-timezones-json": "^1.0.2",
|
||||
"hls.js": "^0.12.4",
|
||||
"home-assistant-js-websocket": "^5.2.1",
|
||||
"home-assistant-js-websocket": "^5.1.2",
|
||||
"idb-keyval": "^3.2.0",
|
||||
"intl-messageformat": "^8.3.9",
|
||||
"js-yaml": "^3.13.1",
|
||||
@@ -203,7 +203,7 @@
|
||||
"_comment": "Polymer fixed to 3.1 because 3.2 throws on logbook page",
|
||||
"_comment_2": "Fix in https://github.com/Polymer/polymer/pull/5569",
|
||||
"resolutions": {
|
||||
"@webcomponents/webcomponentsjs": "^2.2.10",
|
||||
"@webcomponents/webcomponentsjs": "^2.3.4",
|
||||
"@polymer/polymer": "3.1.0",
|
||||
"lit-html": "1.2.1",
|
||||
"lit-element": "2.3.1",
|
||||
|
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="home-assistant-frontend",
|
||||
version="20200603.1",
|
||||
version="20200519.0",
|
||||
description="The Home Assistant frontend",
|
||||
url="https://github.com/home-assistant/home-assistant-polymer",
|
||||
author="The Home Assistant Authors",
|
||||
|
@@ -65,15 +65,14 @@ export const fetchDeviceTriggerCapabilities = (
|
||||
trigger,
|
||||
});
|
||||
|
||||
const deviceAutomationIdentifiers = [
|
||||
"device_id",
|
||||
"domain",
|
||||
"entity_id",
|
||||
"type",
|
||||
"subtype",
|
||||
"event",
|
||||
"condition",
|
||||
"platform",
|
||||
const whitelist = [
|
||||
"above",
|
||||
"below",
|
||||
"brightness_pct",
|
||||
"code",
|
||||
"for",
|
||||
"position",
|
||||
"set_brightness",
|
||||
];
|
||||
|
||||
export const deviceAutomationsEqual = (
|
||||
@@ -85,7 +84,7 @@ export const deviceAutomationsEqual = (
|
||||
}
|
||||
|
||||
for (const property in a) {
|
||||
if (!deviceAutomationIdentifiers.includes(property)) {
|
||||
if (whitelist.includes(property)) {
|
||||
continue;
|
||||
}
|
||||
if (!Object.is(a[property], b[property])) {
|
||||
@@ -93,7 +92,7 @@ export const deviceAutomationsEqual = (
|
||||
}
|
||||
}
|
||||
for (const property in b) {
|
||||
if (!deviceAutomationIdentifiers.includes(property)) {
|
||||
if (whitelist.includes(property)) {
|
||||
continue;
|
||||
}
|
||||
if (!Object.is(a[property], b[property])) {
|
||||
|
@@ -56,8 +56,7 @@ export const fetchRecent = (
|
||||
startTime,
|
||||
endTime,
|
||||
skipInitialState = false,
|
||||
significantChangesOnly?: boolean,
|
||||
minimalResponse = true
|
||||
significantChangesOnly?: boolean
|
||||
): Promise<HassEntity[][]> => {
|
||||
let url = "history/period";
|
||||
if (startTime) {
|
||||
@@ -73,9 +72,6 @@ export const fetchRecent = (
|
||||
if (significantChangesOnly !== undefined) {
|
||||
url += `&significant_changes_only=${Number(significantChangesOnly)}`;
|
||||
}
|
||||
if (minimalResponse) {
|
||||
url += "&minimal_response";
|
||||
}
|
||||
|
||||
return hass.callApi("GET", url);
|
||||
};
|
||||
@@ -87,17 +83,14 @@ export const fetchDate = (
|
||||
): Promise<HassEntity[][]> => {
|
||||
return hass.callApi(
|
||||
"GET",
|
||||
`history/period/${startTime.toISOString()}?end_time=${endTime.toISOString()}&minimal_response`
|
||||
`history/period/${startTime.toISOString()}?end_time=${endTime.toISOString()}`
|
||||
);
|
||||
};
|
||||
|
||||
const equalState = (obj1: LineChartState, obj2: LineChartState) =>
|
||||
obj1.state === obj2.state &&
|
||||
// Only compare attributes if both states have an attributes object.
|
||||
// When `minimal_response` is sent, only the first and last state
|
||||
// will have attributes except for domains in DOMAINS_USE_LAST_UPDATED.
|
||||
// They either both have an attributes object or not
|
||||
(!obj1.attributes ||
|
||||
!obj2.attributes ||
|
||||
LINE_ATTRIBUTES_TO_KEEP.every(
|
||||
(attr) => obj1.attributes![attr] === obj2.attributes![attr]
|
||||
));
|
||||
@@ -108,20 +101,12 @@ const processTimelineEntity = (
|
||||
states: HassEntity[]
|
||||
): TimelineEntity => {
|
||||
const data: TimelineState[] = [];
|
||||
const last_element = states.length - 1;
|
||||
|
||||
for (const state of states) {
|
||||
if (data.length > 0 && state.state === data[data.length - 1].state) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Copy the data from the last element as its the newest
|
||||
// and is only needed to localize the data
|
||||
if (!state.entity_id) {
|
||||
state.attributes = states[last_element].attributes;
|
||||
state.entity_id = states[last_element].entity_id;
|
||||
}
|
||||
|
||||
data.push({
|
||||
state_localize: computeStateDisplay(localize, state, language),
|
||||
state: state.state,
|
||||
@@ -213,7 +198,7 @@ export const computeHistory = (
|
||||
}
|
||||
|
||||
const stateWithUnit = stateInfo.find(
|
||||
(state) => state.attributes && "unit_of_measurement" in state.attributes
|
||||
(state) => "unit_of_measurement" in state.attributes
|
||||
);
|
||||
|
||||
let unit: string | undefined;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// Compat needs to be first import
|
||||
import "../resources/compatibility";
|
||||
import "@polymer/polymer/lib/elements/dom-if";
|
||||
import "@polymer/polymer/lib/elements/dom-repeat";
|
||||
import "../auth/ha-authorize";
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// Compat needs to be first import
|
||||
import "../resources/compatibility";
|
||||
import {
|
||||
Auth,
|
||||
Connection,
|
||||
@@ -26,7 +28,6 @@ import { HomeAssistant } from "../types";
|
||||
declare global {
|
||||
interface Window {
|
||||
hassConnection: Promise<{ auth: Auth; conn: Connection }>;
|
||||
hassConnectionReady?: (hassConnection: Window["hassConnection"]) => void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,11 +82,6 @@ window.hassConnection = (authProm() as Promise<Auth | ExternalAuth>).then(
|
||||
connProm
|
||||
);
|
||||
|
||||
// This is set if app was somehow loaded before core.
|
||||
if (window.hassConnectionReady) {
|
||||
window.hassConnectionReady(window.hassConnection);
|
||||
}
|
||||
|
||||
// Start fetching some of the data that we will need.
|
||||
window.hassConnection.then(({ conn }) => {
|
||||
const noop = () => {
|
||||
|
@@ -21,7 +21,7 @@ window.loadES5Adapter = () => {
|
||||
loadJS(
|
||||
`${__STATIC_PATH__}polyfills/custom-elements-es5-adapter.js`
|
||||
).catch(),
|
||||
import(/* webpackChunkName: "compat" */ "./compatibility"),
|
||||
import(/* webpackChunkName: "compat" */ "../resources/compatibility"),
|
||||
]);
|
||||
}
|
||||
return es5Loaded;
|
||||
@@ -51,6 +51,7 @@ function initialize(panel: CustomPanelInfo, properties: {}) {
|
||||
}
|
||||
|
||||
if (__BUILD__ === "es5") {
|
||||
// Load ES5 adapter. Swallow errors as it raises errors on old browsers.
|
||||
start = start.then(() => window.loadES5Adapter());
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// Compat needs to be first import
|
||||
import "../resources/compatibility";
|
||||
import "../onboarding/ha-onboarding";
|
||||
import "../resources/ha-style";
|
||||
import "../resources/roboto";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { HassConfig, STATE_RUNNING } from "home-assistant-js-websocket";
|
||||
import { HassConfig } from "home-assistant-js-websocket";
|
||||
|
||||
export const demoConfig: HassConfig = {
|
||||
location_name: "Home",
|
||||
@@ -18,7 +18,6 @@ export const demoConfig: HassConfig = {
|
||||
whitelist_external_dirs: [],
|
||||
config_source: "storage",
|
||||
safe_mode: false,
|
||||
state: STATE_RUNNING,
|
||||
internal_url: "http://homeassistant.local:8123",
|
||||
external_url: null,
|
||||
};
|
||||
|
@@ -1,16 +0,0 @@
|
||||
<script>
|
||||
if (navigator.userAgent.indexOf("Android") === -1 &&
|
||||
navigator.userAgent.indexOf("CrOS") === -1) {
|
||||
function _pf(src, type) {
|
||||
const el = document.createElement("link");
|
||||
el.rel = "preload";
|
||||
el.as = "font";
|
||||
el.type = "font/woff2";
|
||||
el.href = src;
|
||||
el.crossOrigin = "anonymous";
|
||||
document.head.append(el);
|
||||
}
|
||||
_pf("/static/fonts/roboto/Roboto-Regular.woff2");
|
||||
_pf("/static/fonts/roboto/Roboto-Medium.woff2");
|
||||
}
|
||||
</script>
|
@@ -3,6 +3,18 @@
|
||||
<head>
|
||||
<title>Home Assistant</title>
|
||||
<link rel="preload" href="<%= latestPageJS %>" as="script" crossorigin="use-credentials" />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Light.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<%= renderTemplate('_header') %>
|
||||
<style>
|
||||
.content {
|
||||
@@ -34,7 +46,6 @@
|
||||
</div>
|
||||
|
||||
<%= renderTemplate('_js_base') %>
|
||||
<%= renderTemplate('_preload_roboto') %>
|
||||
|
||||
<script type="module" crossorigin="use-credentials">
|
||||
import "<%= latestPageJS %>";
|
||||
@@ -50,12 +61,9 @@
|
||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
||||
<% if (useRollup) { %>
|
||||
_ls("/static/js/s.min.js").onload = function() {
|
||||
System.import("<%= es5Compatibility %>").then(function() {
|
||||
System.import("<%= es5PageJS %>");
|
||||
});
|
||||
System.import("<%= es5PageJS %>");
|
||||
}
|
||||
<% } else { %>
|
||||
_ls("<%= es5Compatibility %>");
|
||||
_ls("<%= es5PageJS %>");
|
||||
<% } %>
|
||||
}
|
||||
|
@@ -2,7 +2,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="preload" href="<%= latestCoreJS %>" as="script" crossorigin="use-credentials" />
|
||||
<link rel="preload" href="<%= latestAppJS %>" as="script" crossorigin="use-credentials" />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Medium.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<%= renderTemplate('_header') %>
|
||||
<title>Home Assistant</title>
|
||||
<link
|
||||
@@ -50,34 +61,31 @@
|
||||
<home-assistant> </home-assistant>
|
||||
|
||||
<%= renderTemplate('_js_base') %>
|
||||
<%= renderTemplate('_preload_roboto') %>
|
||||
|
||||
<script>
|
||||
import("<%= latestCoreJS %>");
|
||||
import("<%= latestAppJS %>");
|
||||
<script type="module" crossorigin="use-credentials">
|
||||
import "<%= latestCoreJS %>";
|
||||
import "<%= latestAppJS %>";
|
||||
window.customPanelJS = "<%= latestCustomPanelJS %>";
|
||||
window.latestJS = true;
|
||||
</script>
|
||||
{% for extra_module in extra_modules -%}
|
||||
<script type="module" crossorigin="use-credentials" src="{{ extra_module }}"></script>
|
||||
{% endfor -%}
|
||||
|
||||
<script>
|
||||
|
||||
<script nomodule>
|
||||
(function() {
|
||||
if (!window.latestJS) {
|
||||
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
||||
if (!isS101) {
|
||||
window.customPanelJS = "<%= es5CustomPanelJS %>";
|
||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
||||
|
||||
<% if (useRollup) { %>
|
||||
_ls("/static/js/s.min.js").onload = function() {
|
||||
System.import("<%= es5Compatibility %>").then(function() {
|
||||
return System.import("<%= es5CoreJS %>");
|
||||
}).then(function() {
|
||||
return System.import("<%= es5CoreJS %>").then(function() {
|
||||
System.import("<%= es5AppJS %>");
|
||||
});
|
||||
}
|
||||
<% } else { %>
|
||||
_ls("<%= es5Compatibility %>");
|
||||
_ls("<%= es5CoreJS %>");
|
||||
_ls("<%= es5AppJS %>");
|
||||
<% } %>
|
||||
|
@@ -3,6 +3,18 @@
|
||||
<head>
|
||||
<title>Home Assistant</title>
|
||||
<link rel="preload" href="<%= latestPageJS %>" as="script" crossorigin="use-credentials" />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Light.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/static/fonts/roboto/Roboto-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
<%= renderTemplate('_header') %>
|
||||
<style>
|
||||
.content {
|
||||
@@ -36,7 +48,6 @@
|
||||
</div>
|
||||
|
||||
<%= renderTemplate('_js_base') %>
|
||||
<%= renderTemplate('_preload_roboto') %>
|
||||
|
||||
<script type="module" crossorigin="use-credentials">
|
||||
import "<%= latestPageJS %>";
|
||||
@@ -52,12 +63,9 @@
|
||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
||||
<% if (useRollup) { %>
|
||||
_ls("/static/js/s.min.js").onload = function() {
|
||||
System.import("<%= es5Compatibility %>").then(function() {
|
||||
System.import("<%= es5PageJS %>");
|
||||
});
|
||||
System.import("<%= es5PageJS %>");
|
||||
}
|
||||
<% } else { %>
|
||||
_ls("<%= es5Compatibility %>");
|
||||
_ls("<%= es5PageJS %>");
|
||||
<% } %>
|
||||
}
|
||||
|
@@ -93,18 +93,7 @@ export class HomeAssistantAppEl extends HassElement {
|
||||
|
||||
protected async _initialize() {
|
||||
try {
|
||||
let result;
|
||||
|
||||
if (window.hassConnection) {
|
||||
result = await window.hassConnection;
|
||||
} else {
|
||||
// In the edge case that
|
||||
result = await new Promise((resolve) => {
|
||||
window.hassConnectionReady = resolve;
|
||||
});
|
||||
}
|
||||
|
||||
const { auth, conn } = result;
|
||||
const { auth, conn } = await window.hassConnection;
|
||||
this._haVersion = conn.haVersion;
|
||||
this.initializeHass(auth, conn);
|
||||
} catch (err) {
|
||||
|
@@ -8,11 +8,6 @@ import {
|
||||
RouteOptions,
|
||||
RouterOptions,
|
||||
} from "./hass-router-page";
|
||||
import {
|
||||
STATE_STARTING,
|
||||
STATE_NOT_RUNNING,
|
||||
STATE_RUNNING,
|
||||
} from "home-assistant-js-websocket";
|
||||
|
||||
const CACHE_URL_PATHS = ["lovelace", "developer-tools"];
|
||||
const COMPONENTS = {
|
||||
@@ -89,8 +84,6 @@ class PartialPanelResolver extends HassRouterPage {
|
||||
|
||||
@property() public narrow?: boolean;
|
||||
|
||||
private _waitForStart = false;
|
||||
|
||||
protected updated(changedProps: PropertyValues) {
|
||||
super.updated(changedProps);
|
||||
|
||||
@@ -100,15 +93,6 @@ class PartialPanelResolver extends HassRouterPage {
|
||||
|
||||
const oldHass = changedProps.get("hass") as this["hass"];
|
||||
|
||||
if (
|
||||
this._waitForStart &&
|
||||
(this.hass.config.state === STATE_STARTING ||
|
||||
this.hass.config.state === STATE_RUNNING)
|
||||
) {
|
||||
this._waitForStart = false;
|
||||
this.rebuild();
|
||||
}
|
||||
|
||||
if (this.hass.panels && (!oldHass || oldHass.panels !== this.hass.panels)) {
|
||||
this._updateRoutes(oldHass?.panels);
|
||||
}
|
||||
@@ -131,34 +115,19 @@ class PartialPanelResolver extends HassRouterPage {
|
||||
hass: this.hass,
|
||||
narrow: this.narrow,
|
||||
route: this.routeTail,
|
||||
panel: hass.panels[this._currentPage],
|
||||
panel: hass.panels[hass.panelUrl],
|
||||
});
|
||||
} else {
|
||||
el.hass = hass;
|
||||
el.narrow = this.narrow;
|
||||
el.route = this.routeTail;
|
||||
el.panel = hass.panels[this._currentPage];
|
||||
el.panel = hass.panels[hass.panelUrl];
|
||||
}
|
||||
}
|
||||
|
||||
private async _updateRoutes(oldPanels?: HomeAssistant["panels"]) {
|
||||
this.routerOptions = getRoutes(this.hass.panels);
|
||||
|
||||
if (
|
||||
!this._waitForStart &&
|
||||
this._currentPage &&
|
||||
!this.hass.panels[this._currentPage]
|
||||
) {
|
||||
if (this.hass.config.state !== STATE_NOT_RUNNING) {
|
||||
this._waitForStart = true;
|
||||
if (this.lastChild) {
|
||||
this.removeChild(this.lastChild);
|
||||
}
|
||||
this.appendChild(this.createLoadingScreen());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!oldPanels ||
|
||||
!deepEqual(
|
||||
|
@@ -24,11 +24,7 @@ export const SubscribeMixin = <T extends Constructor<UpdatingElement>>(
|
||||
if (this.__unsubs) {
|
||||
while (this.__unsubs.length) {
|
||||
const unsub = this.__unsubs.pop()!;
|
||||
if (unsub instanceof Promise) {
|
||||
unsub.then((unsubFunc) => unsubFunc());
|
||||
} else {
|
||||
unsub();
|
||||
}
|
||||
Promise.resolve(unsub).then((unsubFunc) => unsubFunc());
|
||||
}
|
||||
this.__unsubs = undefined;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ class HaConfigCustomize extends LocalizeMixin(PolymerElement) {
|
||||
</span>
|
||||
<ha-entity-config
|
||||
hass="[[hass]]"
|
||||
label="[[localize('ui.panel.config.customize.picker.entity')]]"
|
||||
label="Entity"
|
||||
entities="[[entities]]"
|
||||
config="[[entityConfig]]"
|
||||
>
|
||||
|
@@ -152,7 +152,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
||||
columns.url_path = {
|
||||
title: "",
|
||||
filterable: true,
|
||||
width: "100px",
|
||||
width: "75px",
|
||||
template: (urlPath) =>
|
||||
narrow
|
||||
? html`
|
||||
|
@@ -85,7 +85,7 @@ export class DialogAddUser extends LitElement {
|
||||
required
|
||||
auto-validate
|
||||
autocapitalize="on"
|
||||
.errorMessage=${this.hass.localize("ui.common.error_required")}
|
||||
error-message="Required"
|
||||
@value-changed=${this._nameChanged}
|
||||
@blur=${this._maybePopulateUsername}
|
||||
></paper-input>
|
||||
@@ -99,7 +99,7 @@ export class DialogAddUser extends LitElement {
|
||||
auto-validate
|
||||
autocapitalize="none"
|
||||
@value-changed=${this._usernameChanged}
|
||||
.errorMessage=${this.hass.localize("ui.common.error_required")}
|
||||
error-message="Required"
|
||||
></paper-input>
|
||||
<paper-input
|
||||
.label=${this.hass.localize(
|
||||
@@ -110,7 +110,7 @@ export class DialogAddUser extends LitElement {
|
||||
required
|
||||
auto-validate
|
||||
@value-changed=${this._passwordChanged}
|
||||
.errorMessage=${this.hass.localize("ui.common.error_required")}
|
||||
error-message="Required"
|
||||
></paper-input>
|
||||
<ha-switch .checked=${this._isAdmin} @change=${this._adminChanged}>
|
||||
${this.hass.localize("ui.panel.config.users.editor.admin")}
|
||||
@@ -118,9 +118,10 @@ export class DialogAddUser extends LitElement {
|
||||
${!this._isAdmin
|
||||
? html`
|
||||
<br />
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.users.users_privileges_note"
|
||||
)}
|
||||
The users group is a work in progress. The user will be unable
|
||||
to administer the instance via the UI. We're still auditing all
|
||||
management API endpoints to ensure that they correctly limit
|
||||
access to administrators.
|
||||
`
|
||||
: ""}
|
||||
</div>
|
||||
|
@@ -109,9 +109,10 @@ class DialogUserDetail extends LitElement {
|
||||
${!this._isAdmin
|
||||
? html`
|
||||
<br />
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.users.users_privileges_note"
|
||||
)}
|
||||
The users group is a work in progress. The user will be unable
|
||||
to administer the instance via the UI. We're still auditing
|
||||
all management API endpoints to ensure that they correctly
|
||||
limit access to administrators.
|
||||
`
|
||||
: ""}
|
||||
</div>
|
||||
|
@@ -106,9 +106,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
<!-- Node card -->
|
||||
<ha-config-section is-wide="[[isWide]]">
|
||||
<div class="sectionHeader" slot="header">
|
||||
<span
|
||||
>[[localize('ui.panel.config.zwave.node_management.header')]]</span
|
||||
>
|
||||
<span>Z-Wave Node Management</span>
|
||||
<ha-icon-button
|
||||
class="toggle-help-icon"
|
||||
on-click="toggleHelp"
|
||||
@@ -116,16 +114,13 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
<span slot="introduction">
|
||||
[[localize('ui.panel.config.zwave.node_management.introduction')]]
|
||||
Run Z-Wave commands that affect a single node. Pick a node to see a
|
||||
list of available commands.
|
||||
</span>
|
||||
|
||||
<ha-card class="content">
|
||||
<div class="device-picker">
|
||||
<paper-dropdown-menu
|
||||
dynamic-align=""
|
||||
label="[[localize('ui.panel.config.zwave.node_management.nodes')]]"
|
||||
class="flex"
|
||||
>
|
||||
<paper-dropdown-menu dynamic-align="" label="Nodes" class="flex">
|
||||
<paper-listbox
|
||||
slot="dropdown-content"
|
||||
selected="{{selectedNode}}"
|
||||
@@ -139,7 +134,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
<template is="dom-if" if="[[!computeIsNodeSelected(selectedNode)]]">
|
||||
<template is="dom-if" if="[[showHelp]]">
|
||||
<div style="color: grey; padding: 12px">
|
||||
[[localize('ui.panel.config.zwave.node_management.introduction')]]
|
||||
Select node to view per-node options
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
@@ -152,7 +147,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="refresh_node"
|
||||
service-data="[[computeNodeServiceData(selectedNode)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.refresh_node')]]
|
||||
Refresh Node
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -169,7 +164,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="remove_failed_node"
|
||||
service-data="[[computeNodeServiceData(selectedNode)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.remove_failed_node')]]
|
||||
Remove Failed Node
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -185,7 +180,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="replace_failed_node"
|
||||
service-data="[[computeNodeServiceData(selectedNode)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.replace_failed_node')]]
|
||||
Replace Failed Node
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -202,7 +197,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="print_node"
|
||||
service-data="[[computeNodeServiceData(selectedNode)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.print_node')]]
|
||||
Print Node
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -218,7 +213,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="heal_node"
|
||||
service-data="[[computeHealNodeServiceData(selectedNode)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.heal_node')]]
|
||||
Heal Node
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -234,7 +229,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="test_node"
|
||||
service-data="[[computeNodeServiceData(selectedNode)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.test_node')]]
|
||||
Test Node
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -244,13 +239,13 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
>
|
||||
</ha-service-description>
|
||||
<mwc-button on-click="_nodeMoreInfo"
|
||||
>[[localize('ui.panel.config.zwave.services.node_info')]]</mwc-button
|
||||
>Node Information</mwc-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="device-picker">
|
||||
<paper-dropdown-menu
|
||||
label="[[localize('ui.panel.config.zwave.node_management.entities')]]"
|
||||
label="Entities of this node"
|
||||
dynamic-align=""
|
||||
class="flex"
|
||||
>
|
||||
@@ -275,7 +270,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="refresh_entity"
|
||||
service-data="[[computeRefreshEntityServiceData(selectedEntity)]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.services.refresh_entity')]]
|
||||
Refresh Entity
|
||||
</ha-call-service-button>
|
||||
<ha-service-description
|
||||
hass="[[hass]]"
|
||||
@@ -285,7 +280,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
>
|
||||
</ha-service-description>
|
||||
<mwc-button on-click="_entityMoreInfo"
|
||||
>[[localize('ui.panel.config.zwave.node_management.entity_info')]]</mwc-button
|
||||
>Entity Information</mwc-button
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -293,11 +288,11 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
checked="{{entityIgnored}}"
|
||||
class="form-control"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.node_management.exclude_entity')]]
|
||||
Exclude this entity from Home Assistant
|
||||
</paper-checkbox>
|
||||
<paper-input
|
||||
disabled="{{entityIgnored}}"
|
||||
label="[[localize('ui.panel.config.zwave.node_management.pooling_intensity')]]"
|
||||
label="Polling intensity"
|
||||
type="number"
|
||||
min="0"
|
||||
value="{{entityPollingIntensity}}"
|
||||
@@ -311,7 +306,7 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
service="set_poll_intensity"
|
||||
service-data="[[computePollIntensityServiceData(entityPollingIntensity)]]"
|
||||
>
|
||||
[[localize('ui.common.save')]]
|
||||
Save
|
||||
</ha-call-service-button>
|
||||
</div>
|
||||
</template>
|
||||
|
@@ -36,17 +36,10 @@ class ZwaveGroups extends PolymerElement {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
</style>
|
||||
<ha-card
|
||||
class="content"
|
||||
header="[[localize('ui.panel.config.zwave.node_management.node_group_associations')]]"
|
||||
>
|
||||
<ha-card class="content" header="Node group associations">
|
||||
<!-- TODO make api for getting groups and members -->
|
||||
<div class="device-picker">
|
||||
<paper-dropdown-menu
|
||||
label="[[localize('ui.panel.config.zwave.node_management.group')]]"
|
||||
dynamic-align=""
|
||||
class="flex"
|
||||
>
|
||||
<paper-dropdown-menu label="Group" dynamic-align="" class="flex">
|
||||
<paper-listbox
|
||||
slot="dropdown-content"
|
||||
selected="{{_selectedGroup}}"
|
||||
@@ -60,7 +53,7 @@ class ZwaveGroups extends PolymerElement {
|
||||
<template is="dom-if" if="[[_computeIsGroupSelected(_selectedGroup)]]">
|
||||
<div class="device-picker">
|
||||
<paper-dropdown-menu
|
||||
label="[[localize('ui.panel.config.zwave.node_management.node_to_control')]]"
|
||||
label="Node to control"
|
||||
dynamic-align=""
|
||||
class="flex"
|
||||
>
|
||||
@@ -76,18 +69,13 @@ class ZwaveGroups extends PolymerElement {
|
||||
</div>
|
||||
|
||||
<div class="help-text">
|
||||
<span
|
||||
>[[localize('ui.panel.config.zwave.node_management.nodes_in_group')]]</span
|
||||
>
|
||||
<span>Other Nodes in this group:</span>
|
||||
<template is="dom-repeat" items="[[_otherGroupNodes]]" as="state">
|
||||
<div>[[state]]</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="help-text">
|
||||
<span
|
||||
>[[localize('ui.panel.config.zwave.node_management.max_associations')]]</span
|
||||
>
|
||||
<span>[[_maxAssociations]]</span>
|
||||
<span>Max Associations:</span> <span>[[_maxAssociations]]</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -103,7 +91,7 @@ class ZwaveGroups extends PolymerElement {
|
||||
service="change_association"
|
||||
service-data="[[_addAssocServiceData]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.node_management.add_to_group')]]
|
||||
Add To Group
|
||||
</ha-call-service-button>
|
||||
</template>
|
||||
<template
|
||||
@@ -116,7 +104,7 @@ class ZwaveGroups extends PolymerElement {
|
||||
service="change_association"
|
||||
service-data="[[_removeAssocServiceData]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.node_management.remove_from_group')]]
|
||||
Remove From Group
|
||||
</ha-call-service-button>
|
||||
</template>
|
||||
<template is="dom-if" if="[[_isBroadcastNodeInGroup]]">
|
||||
@@ -126,7 +114,7 @@ class ZwaveGroups extends PolymerElement {
|
||||
service="change_association"
|
||||
service-data="[[_removeBroadcastNodeServiceData]]"
|
||||
>
|
||||
[[localize('ui.panel.config.zwave.node_management.remove_broadcast')]]
|
||||
Remove Broadcast
|
||||
</ha-call-service-button>
|
||||
</template>
|
||||
</div>
|
||||
|
@@ -42,12 +42,12 @@ class OzwLog extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
</span>
|
||||
<ha-card class="content">
|
||||
<div class="device-picker">
|
||||
<paper-input label="[[localize('ui.panel.config.zwave.ozw_log.last_log_lines')]]" type="number" min="0" max="1000" step="10" value="{{numLogLines}}">
|
||||
<paper-input label="Number of last log lines." type="number" min="0" max="1000" step="10" value="{{numLogLines}}">
|
||||
</paper-input>
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
<mwc-button raised="true" on-click="_openLogWindow">[[localize('ui.panel.config.zwave.ozw_log.load')]]</mwc-button>
|
||||
<mwc-button raised="true" on-click="_tailLog" disabled="{{_completeLog}}">[[localize('ui.panel.config.zwave.ozw_log.tail')]]</mwc-button>
|
||||
<mwc-button raised="true" on-click="_openLogWindow">Load</mwc-button>
|
||||
<mwc-button raised="true" on-click="_tailLog" disabled="{{_completeLog}}">Tail</mwc-button>
|
||||
</ha-card>
|
||||
</ha-config-section>
|
||||
`;
|
||||
|
@@ -33,9 +33,9 @@ class ZwaveNodeProtection extends PolymerElement {
|
||||
|
||||
</style>
|
||||
<div class="content">
|
||||
<ha-card header="[[localize('ui.panel.config.zwave.node_management.node_protection')]]">
|
||||
<ha-card header="Node protection">
|
||||
<div class="device-picker">
|
||||
<paper-dropdown-menu label="[[localize('ui.panel.config.zwave.node_management.protection')]]" dynamic-align class="flex" placeholder="{{_loadedProtectionValue}}">
|
||||
<paper-dropdown-menu label="Protection" dynamic-align class="flex" placeholder="{{_loadedProtectionValue}}">
|
||||
<paper-listbox slot="dropdown-content" selected="{{_selectedProtectionParameter}}">
|
||||
<template is="dom-repeat" items="[[_protectionOptions]]" as="state">
|
||||
<paper-item>[[state]]</paper-item>
|
||||
@@ -48,7 +48,7 @@ class ZwaveNodeProtection extends PolymerElement {
|
||||
hass="[[hass]]"
|
||||
path="[[_nodePath]]"
|
||||
data="[[_protectionData]]">
|
||||
[[localize('ui.panel.config.zwave.node_management.set_protection')]]
|
||||
Set Protection
|
||||
</ha-call-service-button>
|
||||
</div>
|
||||
</ha-card>
|
||||
|
@@ -45,7 +45,6 @@ class HaPanelDevState extends EventsMixin(LocalizeMixin(PolymerElement)) {
|
||||
}
|
||||
|
||||
.entities tr {
|
||||
word-break: break-word;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
@@ -5,17 +5,16 @@ import { createBadgeElement } from "../create-element/create-badge-element";
|
||||
import { EntityFilterEntityConfig } from "../entity-rows/types";
|
||||
import { LovelaceBadge } from "../types";
|
||||
import { EntityFilterBadgeConfig } from "./types";
|
||||
import { UpdatingElement, property, PropertyValues } from "lit-element";
|
||||
|
||||
class EntityFilterBadge extends UpdatingElement implements LovelaceBadge {
|
||||
@property() public hass!: HomeAssistant;
|
||||
|
||||
@property() private _config?: EntityFilterBadgeConfig;
|
||||
|
||||
class EntityFilterBadge extends HTMLElement implements LovelaceBadge {
|
||||
private _elements?: LovelaceBadge[];
|
||||
|
||||
private _config?: EntityFilterBadgeConfig;
|
||||
|
||||
private _configEntities?: EntityFilterEntityConfig[];
|
||||
|
||||
private _hass?: HomeAssistant;
|
||||
|
||||
private _oldEntities?: EntityFilterEntityConfig[];
|
||||
|
||||
public setConfig(config: EntityFilterBadgeConfig): void {
|
||||
@@ -35,43 +34,39 @@ class EntityFilterBadge extends UpdatingElement implements LovelaceBadge {
|
||||
throw new Error("Incorrect filter config.");
|
||||
}
|
||||
|
||||
while (this.lastChild) {
|
||||
this.removeChild(this.lastChild);
|
||||
}
|
||||
this._elements = undefined;
|
||||
|
||||
this._configEntities = processConfigEntities(config.entities);
|
||||
this._oldEntities = undefined;
|
||||
this._config = config;
|
||||
}
|
||||
this._configEntities = undefined;
|
||||
|
||||
protected shouldUpdate(changedProperties: PropertyValues): boolean {
|
||||
if (
|
||||
changedProperties.has("_config") ||
|
||||
(changedProperties.has("hass") &&
|
||||
this.haveEntitiesChanged(
|
||||
changedProperties.get("hass") as HomeAssistant | undefined
|
||||
))
|
||||
) {
|
||||
return true;
|
||||
if (this.lastChild) {
|
||||
this.removeChild(this.lastChild);
|
||||
this._elements = undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected update(changedProperties: PropertyValues) {
|
||||
super.update(changedProperties);
|
||||
if (!this.hass || !this._configEntities) {
|
||||
set hass(hass: HomeAssistant) {
|
||||
if (!hass || !this._config) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._elements) {
|
||||
for (const element of this._elements) {
|
||||
element.hass = this.hass;
|
||||
element.hass = hass;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.haveEntitiesChanged(hass)) {
|
||||
this._hass = hass;
|
||||
return;
|
||||
}
|
||||
|
||||
this._hass = hass;
|
||||
|
||||
if (!this._configEntities) {
|
||||
this._configEntities = processConfigEntities(this._config.entities);
|
||||
}
|
||||
|
||||
const entitiesList = this._configEntities.filter((entityConf) => {
|
||||
const stateObj = this.hass.states[entityConf.entity];
|
||||
const stateObj = hass.states[entityConf.entity];
|
||||
|
||||
if (!stateObj) {
|
||||
return false;
|
||||
@@ -96,7 +91,6 @@ class EntityFilterBadge extends UpdatingElement implements LovelaceBadge {
|
||||
|
||||
if (entitiesList.length === 0) {
|
||||
this.style.display = "none";
|
||||
this._oldEntities = entitiesList;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -109,7 +103,7 @@ class EntityFilterBadge extends UpdatingElement implements LovelaceBadge {
|
||||
this._elements = [];
|
||||
for (const badgeConfig of entitiesList) {
|
||||
const element = createBadgeElement(badgeConfig);
|
||||
element.hass = this.hass;
|
||||
element.hass = hass;
|
||||
this._elements.push(element);
|
||||
}
|
||||
this._oldEntities = entitiesList;
|
||||
@@ -130,17 +124,17 @@ class EntityFilterBadge extends UpdatingElement implements LovelaceBadge {
|
||||
this.style.display = "inline";
|
||||
}
|
||||
|
||||
private haveEntitiesChanged(oldHass?: HomeAssistant): boolean {
|
||||
if (!oldHass) {
|
||||
private haveEntitiesChanged(hass: HomeAssistant): boolean {
|
||||
if (!this._hass) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!this._oldEntities || this.hass.localize !== oldHass.localize) {
|
||||
if (!this._configEntities || this._hass.localize !== hass.localize) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (const config of this._configEntities!) {
|
||||
if (this.hass.states[config.entity] !== oldHass.states[config.entity]) {
|
||||
for (const config of this._configEntities) {
|
||||
if (this._hass.states[config.entity] !== hass.states[config.entity]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ import { HomeAssistant } from "../../../types";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { handleAction } from "../common/handle-action";
|
||||
import { hasAction } from "../common/has-action";
|
||||
import "../components/hui-warning-element";
|
||||
import { LovelaceBadge } from "../types";
|
||||
import { StateLabelBadgeConfig } from "./types";
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import {
|
||||
} from "../../../data/alarm_control_panel";
|
||||
import type { HomeAssistant } from "../../../types";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import type { LovelaceCard } from "../types";
|
||||
import { AlarmPanelCardConfig } from "./types";
|
||||
|
||||
@@ -75,9 +75,9 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
|
||||
|
||||
@query("#alarmCode") private _input?: PaperInputElement;
|
||||
|
||||
public async getCardSize(): Promise<number> {
|
||||
public getCardSize(): number {
|
||||
if (!this._config || !this.hass) {
|
||||
return 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const stateObj = this.hass.states[this._config.entity];
|
||||
@@ -151,9 +151,13 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { handleAction } from "../common/handle-action";
|
||||
import { hasAction } from "../common/has-action";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { ButtonCardConfig } from "./types";
|
||||
|
||||
@@ -79,9 +79,7 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
|
||||
@internalProperty() private _shouldRenderRipple = false;
|
||||
|
||||
public getCardSize(): number {
|
||||
return (
|
||||
(this._config?.show_icon ? 3 : 0) + (this._config?.show_name ? 1 : 0)
|
||||
);
|
||||
return 2;
|
||||
}
|
||||
|
||||
public setConfig(config: ButtonCardConfig): void {
|
||||
@@ -147,9 +145,13 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (this._config.entity && !stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class HuiConditionalCard extends HuiConditionalBase implements LovelaceCard {
|
||||
this._element = this._createCardElement(config.card);
|
||||
}
|
||||
|
||||
public getCardSize(): Promise<number> | number {
|
||||
public getCardSize(): number {
|
||||
return computeCardSize(this._element as LovelaceCard);
|
||||
}
|
||||
|
||||
|
@@ -19,13 +19,13 @@ import "../components/hui-entities-toggle";
|
||||
import { createHeaderFooterElement } from "../create-element/create-header-footer-element";
|
||||
import { createRowElement } from "../create-element/create-row-element";
|
||||
import { LovelaceRow } from "../entity-rows/types";
|
||||
import { LovelaceHeaderFooterConfig } from "../header-footer/types";
|
||||
import {
|
||||
LovelaceCard,
|
||||
LovelaceCardEditor,
|
||||
LovelaceHeaderFooter,
|
||||
} from "../types";
|
||||
import { EntitiesCardConfig, EntitiesCardEntityConfig } from "./types";
|
||||
import { computeCardSize } from "../common/compute-card-size";
|
||||
|
||||
@customElement("hui-entities-card")
|
||||
class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
@@ -61,10 +61,6 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
|
||||
private _showHeaderToggle?: boolean;
|
||||
|
||||
private _headerElement?: LovelaceHeaderFooter;
|
||||
|
||||
private _footerElement?: LovelaceHeaderFooter;
|
||||
|
||||
set hass(hass: HomeAssistant) {
|
||||
this._hass = hass;
|
||||
this.shadowRoot!.querySelectorAll("#states > div > *").forEach(
|
||||
@@ -72,12 +68,11 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
(element as LovelaceRow).hass = hass;
|
||||
}
|
||||
);
|
||||
if (this._headerElement) {
|
||||
this._headerElement.hass = hass;
|
||||
}
|
||||
if (this._footerElement) {
|
||||
this._footerElement.hass = hass;
|
||||
}
|
||||
this.shadowRoot!.querySelectorAll(".header-footer > *").forEach(
|
||||
(element: unknown) => {
|
||||
(element as LovelaceHeaderFooter).hass = hass;
|
||||
}
|
||||
);
|
||||
const entitiesToggle = this.shadowRoot!.querySelector(
|
||||
"hui-entities-toggle"
|
||||
);
|
||||
@@ -86,24 +81,12 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
public async getCardSize(): Promise<number> {
|
||||
public getCardSize(): number {
|
||||
if (!this._config) {
|
||||
return 0;
|
||||
}
|
||||
// +1 for the header
|
||||
let size =
|
||||
(this._config.title || this._showHeaderToggle ? 1 : 0) +
|
||||
(this._config.entities.length || 1);
|
||||
if (this._headerElement) {
|
||||
const headerSize = computeCardSize(this._headerElement);
|
||||
size += headerSize instanceof Promise ? await headerSize : headerSize;
|
||||
}
|
||||
if (this._footerElement) {
|
||||
const footerSize = computeCardSize(this._footerElement);
|
||||
size += footerSize instanceof Promise ? await footerSize : footerSize;
|
||||
}
|
||||
|
||||
return size;
|
||||
return (this._config.title ? 1 : 0) + this._config.entities.length;
|
||||
}
|
||||
|
||||
public setConfig(config: EntitiesCardConfig): void {
|
||||
@@ -127,24 +110,6 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
} else {
|
||||
this._showHeaderToggle = config.show_header_toggle;
|
||||
}
|
||||
|
||||
if (this._config.header) {
|
||||
this._headerElement = createHeaderFooterElement(this._config.header);
|
||||
if (this._hass) {
|
||||
this._headerElement.hass = this._hass;
|
||||
}
|
||||
} else {
|
||||
this._headerElement = undefined;
|
||||
}
|
||||
|
||||
if (this._config.footer) {
|
||||
this._footerElement = createHeaderFooterElement(this._config.footer);
|
||||
if (this._hass) {
|
||||
this._footerElement.hass = this._hass;
|
||||
}
|
||||
} else {
|
||||
this._footerElement = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
protected updated(changedProps: PropertyValues): void {
|
||||
@@ -174,10 +139,8 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
|
||||
return html`
|
||||
<ha-card>
|
||||
${this._headerElement
|
||||
? html`<div class="header-footer header">
|
||||
${this._headerElement}
|
||||
</div>`
|
||||
${this._config.header
|
||||
? this.renderHeaderFooter(this._config.header, "header")
|
||||
: ""}
|
||||
${!this._config.title && !this._showHeaderToggle && !this._config.icon
|
||||
? ""
|
||||
@@ -212,10 +175,8 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
)}
|
||||
</div>
|
||||
|
||||
${this._footerElement
|
||||
? html`<div class="header-footer footer">
|
||||
${this._footerElement}
|
||||
</div>`
|
||||
${this._config.footer
|
||||
? this.renderHeaderFooter(this._config.footer, "footer")
|
||||
: ""}
|
||||
</ha-card>
|
||||
`;
|
||||
@@ -284,6 +245,17 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
`;
|
||||
}
|
||||
|
||||
private renderHeaderFooter(
|
||||
conf: LovelaceHeaderFooterConfig,
|
||||
className: string
|
||||
): TemplateResult {
|
||||
const element = createHeaderFooterElement(conf);
|
||||
if (this._hass) {
|
||||
element.hass = this._hass;
|
||||
}
|
||||
return html` <div class=${"header-footer " + className}>${element}</div> `;
|
||||
}
|
||||
|
||||
private renderEntity(entityConf: EntitiesCardEntityConfig): TemplateResult {
|
||||
const element = createRowElement(
|
||||
this._config!.state_color
|
||||
|
@@ -20,7 +20,7 @@ import { UNAVAILABLE_STATES } from "../../../data/entity";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { createHeaderFooterElement } from "../create-element/create-header-footer-element";
|
||||
import {
|
||||
LovelaceCard,
|
||||
@@ -29,7 +29,6 @@ import {
|
||||
} from "../types";
|
||||
import { HuiErrorCard } from "./hui-error-card";
|
||||
import { EntityCardConfig } from "./types";
|
||||
import { computeCardSize } from "../common/compute-card-size";
|
||||
|
||||
@customElement("hui-entity-card")
|
||||
export class HuiEntityCard extends LitElement implements LovelaceCard {
|
||||
@@ -80,13 +79,8 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
public async getCardSize(): Promise<number> {
|
||||
let size = 2;
|
||||
if (this._footerElement) {
|
||||
const footerSize = computeCardSize(this._footerElement);
|
||||
size += footerSize instanceof Promise ? await footerSize : footerSize;
|
||||
}
|
||||
return size;
|
||||
public getCardSize(): number {
|
||||
return 1 + (this._config?.footer ? 1 : 0);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult {
|
||||
@@ -98,9 +92,13 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class EntityFilterCard extends UpdatingElement implements LovelaceCard {
|
||||
|
||||
private _oldEntities?: EntityFilterEntityConfig[];
|
||||
|
||||
public getCardSize(): number | Promise<number> {
|
||||
public getCardSize(): number {
|
||||
return this._element ? computeCardSize(this._element) : 1;
|
||||
}
|
||||
|
||||
@@ -57,9 +57,8 @@ class EntityFilterCard extends UpdatingElement implements LovelaceCard {
|
||||
|
||||
if (this.lastChild) {
|
||||
this.removeChild(this.lastChild);
|
||||
this._element = undefined;
|
||||
}
|
||||
|
||||
this._element = this._createCardElement(this._baseCardConfig);
|
||||
}
|
||||
|
||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||
@@ -82,12 +81,7 @@ class EntityFilterCard extends UpdatingElement implements LovelaceCard {
|
||||
|
||||
protected update(changedProps: PropertyValues) {
|
||||
super.update(changedProps);
|
||||
if (
|
||||
!this.hass ||
|
||||
!this._config ||
|
||||
!this._configEntities ||
|
||||
!this._element
|
||||
) {
|
||||
if (!this.hass || !this._config || !this._configEntities) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -120,8 +114,8 @@ class EntityFilterCard extends UpdatingElement implements LovelaceCard {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.lastChild) {
|
||||
this._element.setConfig({
|
||||
if (!this._element) {
|
||||
this._element = this._createCardElement({
|
||||
...this._baseCardConfig!,
|
||||
entities: entitiesList,
|
||||
});
|
||||
|
@@ -20,7 +20,7 @@ import "../../../components/ha-card";
|
||||
import type { HomeAssistant } from "../../../types";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import type { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import type { GaugeCardConfig } from "./types";
|
||||
import { debounce } from "../../../common/util/debounce";
|
||||
@@ -105,9 +105,13 @@ class HuiGaugeCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,6 @@ import "../components/hui-warning-element";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import "../components/hui-timestamp-display";
|
||||
import { GlanceCardConfig, GlanceConfigEntity } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-glance-card")
|
||||
export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
@@ -68,10 +67,7 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
public getCardSize(): number {
|
||||
return (
|
||||
(this._config!.title ? 1 : 0) +
|
||||
Math.max(
|
||||
Math.ceil(this._configEntities!.length / (this._config!.columns || 5)),
|
||||
1
|
||||
)
|
||||
Math.ceil(this._configEntities!.length / 5)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -216,7 +212,11 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning-element
|
||||
.label=${createEntityNotFoundWarning(this.hass!, entityConf.entity)}
|
||||
label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
entityConf.entity
|
||||
)}
|
||||
></hui-warning-element>
|
||||
`;
|
||||
}
|
||||
|
@@ -3,20 +3,17 @@ import { computeCardSize } from "../common/compute-card-size";
|
||||
import { HuiStackCard } from "./hui-stack-card";
|
||||
|
||||
class HuiHorizontalStackCard extends HuiStackCard {
|
||||
public async getCardSize(): Promise<number> {
|
||||
if (!this._cards) {
|
||||
return 0;
|
||||
public getCardSize(): number {
|
||||
let totalSize = 0;
|
||||
|
||||
if (this._cards) {
|
||||
for (const element of this._cards) {
|
||||
const elementSize = computeCardSize(element);
|
||||
totalSize = elementSize > totalSize ? elementSize : totalSize;
|
||||
}
|
||||
}
|
||||
|
||||
const promises: Array<Promise<number> | number> = [];
|
||||
|
||||
for (const element of this._cards) {
|
||||
promises.push(computeCardSize(element));
|
||||
}
|
||||
|
||||
const results = await Promise.all(promises);
|
||||
|
||||
return Math.max(...results);
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
|
@@ -28,7 +28,7 @@ import { findEntities } from "../common/find-entites";
|
||||
import { handleAction } from "../common/handle-action";
|
||||
import { hasAction } from "../common/has-action";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { LightCardConfig } from "./types";
|
||||
|
||||
@@ -66,7 +66,7 @@ export class HuiLightCard extends LitElement implements LovelaceCard {
|
||||
private _brightnessTimout?: number;
|
||||
|
||||
public getCardSize(): number {
|
||||
return 4;
|
||||
return 2;
|
||||
}
|
||||
|
||||
public setConfig(config: LightCardConfig): void {
|
||||
@@ -89,9 +89,13 @@ export class HuiLightCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -237,9 +237,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
||||
|
||||
protected firstUpdated(changedProps: PropertyValues): void {
|
||||
super.firstUpdated(changedProps);
|
||||
if (this.isConnected) {
|
||||
this.loadMap();
|
||||
}
|
||||
this.loadMap();
|
||||
const root = this.shadowRoot!.getElementById("root");
|
||||
|
||||
if (!this._config || this.isPanel || !root) {
|
||||
@@ -583,7 +581,6 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
||||
startTime.setHours(endTime.getHours() - this._config!.hours_to_show!);
|
||||
const skipInitialState = false;
|
||||
const significantChangesOnly = false;
|
||||
const minimalResponse = false;
|
||||
|
||||
const stateHistory = await fetchRecent(
|
||||
this.hass,
|
||||
@@ -591,8 +588,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
||||
startTime,
|
||||
endTime,
|
||||
skipInitialState,
|
||||
significantChangesOnly,
|
||||
minimalResponse
|
||||
significantChangesOnly
|
||||
);
|
||||
|
||||
if (stateHistory.length < 1) {
|
||||
|
@@ -47,8 +47,7 @@ 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.content.split("\n").length + (this._config.title ? 1 : 0)
|
||||
: this._config.card_size;
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-marquee";
|
||||
import type { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { MediaControlCardConfig } from "./types";
|
||||
import { installResizeObserver } from "../common/install-resize-observer";
|
||||
|
||||
@@ -266,9 +266,13 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ import { handleAction } from "../common/handle-action";
|
||||
import { hasAction } from "../common/has-action";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-image";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { PictureEntityCardConfig } from "./types";
|
||||
|
||||
@@ -116,9 +116,13 @@ class HuiPictureEntityCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,6 @@ import "../components/hui-image";
|
||||
import "../components/hui-warning-element";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { PictureGlanceCardConfig, PictureGlanceEntityConfig } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
const STATES_OFF = new Set(["closed", "locked", "not_home", "off"]);
|
||||
|
||||
@@ -230,7 +229,11 @@ class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning-element
|
||||
.label=${createEntityNotFoundWarning(this.hass!, entityConf.entity)}
|
||||
label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
entityConf.entity
|
||||
)}
|
||||
></hui-warning-element>
|
||||
`;
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { PlantAttributeTarget, PlantStatusCardConfig } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
const SENSORS = {
|
||||
moisture: "hass:water",
|
||||
@@ -106,9 +105,13 @@ class HuiPlantStatusCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ export abstract class HuiStackCard extends LitElement implements LovelaceCard {
|
||||
|
||||
@property() private _config?: StackCardConfig;
|
||||
|
||||
public getCardSize(): number | Promise<number> {
|
||||
public getCardSize(): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -1,80 +0,0 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
PropertyValues,
|
||||
} from "lit-element";
|
||||
import "../../../components/ha-card";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { LovelaceCard } from "../types";
|
||||
import { LovelaceCardConfig } from "../../../data/lovelace";
|
||||
import "@polymer/paper-spinner/paper-spinner-lite";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import { STATE_NOT_RUNNING } from "home-assistant-js-websocket";
|
||||
|
||||
@customElement("hui-starting-card")
|
||||
export class HuiStartingCard extends LitElement implements LovelaceCard {
|
||||
@property() public hass?: HomeAssistant;
|
||||
|
||||
public getCardSize(): number {
|
||||
return 2;
|
||||
}
|
||||
|
||||
public setConfig(_config: LovelaceCardConfig): void {
|
||||
// eslint-disable-next-line
|
||||
}
|
||||
|
||||
protected updated(changedProperties: PropertyValues) {
|
||||
super.updated(changedProperties);
|
||||
if (!changedProperties.has("hass") || !this.hass!.config) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.hass!.config.state !== STATE_NOT_RUNNING) {
|
||||
fireEvent(this, "config-refresh");
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
return html`
|
||||
<div class="content">
|
||||
<paper-spinner-lite active></paper-spinner-lite>
|
||||
${this.hass.localize("ui.panel.lovelace.cards.starting.description")}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
:host {
|
||||
display: block;
|
||||
height: calc(100vh - 64px);
|
||||
}
|
||||
paper-spinner-lite {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
"hui-starting-card": HuiStartingCard;
|
||||
}
|
||||
}
|
@@ -29,7 +29,7 @@ import { HomeAssistant } from "../../../types";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { findEntities } from "../common/find-entites";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import { ThermostatCardConfig } from "./types";
|
||||
|
||||
@@ -77,7 +77,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
@property() private _setTemp?: number | number[];
|
||||
|
||||
public getCardSize(): number {
|
||||
return 5;
|
||||
return 4;
|
||||
}
|
||||
|
||||
public setConfig(config: ThermostatCardConfig): void {
|
||||
@@ -96,9 +96,13 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -3,20 +3,18 @@ import { computeCardSize } from "../common/compute-card-size";
|
||||
import { HuiStackCard } from "./hui-stack-card";
|
||||
|
||||
class HuiVerticalStackCard extends HuiStackCard {
|
||||
public async getCardSize() {
|
||||
if (!this._cards) {
|
||||
return 0;
|
||||
}
|
||||
public getCardSize() {
|
||||
let totalSize = 0;
|
||||
|
||||
const promises: Array<Promise<number> | number> = [];
|
||||
if (!this._cards) {
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
for (const element of this._cards) {
|
||||
promises.push(computeCardSize(element));
|
||||
totalSize += computeCardSize(element);
|
||||
}
|
||||
|
||||
const results = await Promise.all(promises);
|
||||
|
||||
return results.reduce((partial_sum, a) => partial_sum + a, 0);
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
|
@@ -28,7 +28,7 @@ import type { 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 { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import type { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||
import type { WeatherForecastCardConfig } from "./types";
|
||||
import { installResizeObserver } from "../common/install-resize-observer";
|
||||
@@ -66,8 +66,8 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
|
||||
@property() private _config?: WeatherForecastCardConfig;
|
||||
|
||||
@property({ type: Boolean, reflect: true, attribute: "veryverynarrow" })
|
||||
private _veryVeryNarrow = false;
|
||||
@property({ type: Boolean, reflect: true, attribute: "narrow" })
|
||||
private _narrow = false;
|
||||
|
||||
private _resizeObserver?: ResizeObserver;
|
||||
|
||||
@@ -137,9 +137,13 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -158,7 +162,7 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
const forecast =
|
||||
this._config?.show_forecast !== false &&
|
||||
stateObj.attributes.forecast?.length
|
||||
? stateObj.attributes.forecast.slice(0, this._veryVeryNarrow ? 3 : 5)
|
||||
? stateObj.attributes.forecast.slice(0, this._narrow ? 3 : 5)
|
||||
: undefined;
|
||||
|
||||
let hourly: boolean | undefined;
|
||||
@@ -306,17 +310,17 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.offsetWidth < 375) {
|
||||
this.setAttribute("narrow", "");
|
||||
} else {
|
||||
this.removeAttribute("narrow");
|
||||
}
|
||||
this._narrow = this.offsetWidth < 375;
|
||||
if (this.offsetWidth < 300) {
|
||||
this.setAttribute("verynarrow", "");
|
||||
} else {
|
||||
this.removeAttribute("verynarrow");
|
||||
}
|
||||
this._veryVeryNarrow = this.offsetWidth < 245;
|
||||
if (this.offsetWidth < 225) {
|
||||
this.setAttribute("veryverynarrow", "");
|
||||
} else {
|
||||
this.removeAttribute("veryverynarrow");
|
||||
}
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
|
@@ -1,15 +1,5 @@
|
||||
import { LovelaceCard, LovelaceHeaderFooter } from "../types";
|
||||
import { LovelaceCard } from "../types";
|
||||
|
||||
export const computeCardSize = (
|
||||
card: LovelaceCard | LovelaceHeaderFooter
|
||||
): number | Promise<number> => {
|
||||
if (typeof card.getCardSize === "function") {
|
||||
return card.getCardSize();
|
||||
}
|
||||
if (customElements.get(card.localName)) {
|
||||
return 1;
|
||||
}
|
||||
return customElements
|
||||
.whenDefined(card.localName)
|
||||
.then(() => computeCardSize(card));
|
||||
export const computeCardSize = (card: LovelaceCard): number => {
|
||||
return typeof card.getCardSize === "function" ? card.getCardSize() : 4;
|
||||
};
|
||||
|
@@ -2,7 +2,6 @@ import {
|
||||
HassConfig,
|
||||
HassEntities,
|
||||
HassEntity,
|
||||
STATE_NOT_RUNNING,
|
||||
} from "home-assistant-js-websocket";
|
||||
import { computeDomain } from "../../../common/entity/compute_domain";
|
||||
import { computeObjectId } from "../../../common/entity/compute_object_id";
|
||||
@@ -469,28 +468,6 @@ export const generateLovelaceConfigFromHass = async (
|
||||
hass: HomeAssistant,
|
||||
localize?: LocalizeFunc
|
||||
): Promise<LovelaceConfig> => {
|
||||
if (hass.config.state === STATE_NOT_RUNNING) {
|
||||
return {
|
||||
title: hass.config.location_name,
|
||||
views: [
|
||||
{
|
||||
cards: [{ type: "starting" }],
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
if (hass.config.safe_mode) {
|
||||
return {
|
||||
title: hass.config.location_name,
|
||||
views: [
|
||||
{
|
||||
cards: [{ type: "safe-mode" }],
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
// We want to keep the registry subscriptions alive after generating the UI
|
||||
// so that we don't serve up stale data after changing areas.
|
||||
if (!subscribedRegistries) {
|
||||
|
@@ -17,15 +17,14 @@ export function hasConfigOrEntityChanged(
|
||||
|
||||
if (
|
||||
oldHass.themes !== element.hass!.themes ||
|
||||
oldHass.language !== element.hass!.language ||
|
||||
oldHass.localize !== element.hass.localize ||
|
||||
oldHass.config.state !== element.hass.config.state
|
||||
oldHass.language !== element.hass!.language
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
oldHass.states[element._config!.entity] !==
|
||||
element.hass!.states[element._config!.entity]
|
||||
element.hass!.states[element._config!.entity] ||
|
||||
oldHass.localize !== element.hass.localize
|
||||
);
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ import { EntitiesCardEntityConfig } from "../cards/types";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { handleAction } from "../common/handle-action";
|
||||
import { hasAction } from "../common/has-action";
|
||||
import { createEntityNotFoundWarning } from "./hui-warning";
|
||||
import "./hui-warning";
|
||||
|
||||
class HuiGenericEntityRow extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@@ -42,9 +42,13 @@ class HuiGenericEntityRow extends LitElement {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this.config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this.config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ export class HuiWarningElement extends LitElement {
|
||||
@property() public label?: string;
|
||||
|
||||
protected render(): TemplateResult {
|
||||
return html` <ha-icon icon="hass:alert" .title=${this.label}></ha-icon> `;
|
||||
return html` <ha-icon icon="hass:alert" .title="${this.label}"></ha-icon> `;
|
||||
}
|
||||
|
||||
static get styles(): CSSResult {
|
||||
|
@@ -6,21 +6,6 @@ import {
|
||||
LitElement,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { STATE_NOT_RUNNING } from "home-assistant-js-websocket";
|
||||
|
||||
export const createEntityNotFoundWarning = (
|
||||
hass: HomeAssistant,
|
||||
entityId: string
|
||||
) => {
|
||||
return hass.config.state !== STATE_NOT_RUNNING
|
||||
? hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
entityId
|
||||
)
|
||||
: hass.localize("ui.panel.lovelace.warning.starting");
|
||||
};
|
||||
|
||||
@customElement("hui-warning")
|
||||
export class HuiWarning extends LitElement {
|
||||
|
@@ -35,7 +35,6 @@ const LAZY_LOAD_TYPES = {
|
||||
"alarm-panel": () => import("../cards/hui-alarm-panel-card"),
|
||||
error: () => import("../cards/hui-error-card"),
|
||||
"empty-state": () => import("../cards/hui-empty-state-card"),
|
||||
starting: () => import("../cards/hui-starting-card"),
|
||||
"entity-filter": () => import("../cards/hui-entity-filter-card"),
|
||||
"media-control": () => import("../cards/hui-media-control-card"),
|
||||
"picture-elements": () => import("../cards/hui-picture-elements-card"),
|
||||
|
@@ -17,7 +17,6 @@ import { hasAction } from "../common/has-action";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-warning-element";
|
||||
import { LovelaceElement, StateBadgeElementConfig } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-state-badge-element")
|
||||
export class HuiStateBadgeElement extends LitElement
|
||||
@@ -48,7 +47,11 @@ export class HuiStateBadgeElement extends LitElement
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning-element
|
||||
.label=${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
label="${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}"
|
||||
></hui-warning-element>
|
||||
`;
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@ import { hasAction } from "../common/has-action";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-warning-element";
|
||||
import { LovelaceElement, StateIconElementConfig } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-state-icon-element")
|
||||
export class HuiStateIconElement extends LitElement implements LovelaceElement {
|
||||
@@ -49,7 +48,11 @@ export class HuiStateIconElement extends LitElement implements LovelaceElement {
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning-element
|
||||
.label=${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
label=${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}
|
||||
></hui-warning-element>
|
||||
`;
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@ import { hasAction } from "../common/has-action";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-warning-element";
|
||||
import { LovelaceElement, StateLabelElementConfig } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-state-label-element")
|
||||
class HuiStateLabelElement extends LitElement implements LovelaceElement {
|
||||
@@ -49,7 +48,11 @@ class HuiStateLabelElement extends LitElement implements LovelaceElement {
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning-element
|
||||
.label=${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
label=${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}
|
||||
></hui-warning-element>
|
||||
`;
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@ import "../../../components/ha-climate-state";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-climate-entity-row")
|
||||
@@ -42,9 +42,13 @@ class HuiClimateEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ import { HomeAssistant } from "../../../types";
|
||||
import { isTiltOnly } from "../../../util/cover-model";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-cover-entity-row")
|
||||
@@ -43,9 +43,13 @@ class HuiCoverEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import "../../../components/entity/ha-entity-toggle";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-group-entity-row")
|
||||
@@ -41,9 +41,13 @@ class HuiGroupEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,6 @@ import type { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import type { EntityConfig, LovelaceRow } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-input-datetime-entity-row")
|
||||
class HuiInputDatetimeEntityRow extends LitElement implements LovelaceRow {
|
||||
@@ -44,9 +43,13 @@ class HuiInputDatetimeEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -16,8 +16,8 @@ import { setValue } from "../../../data/input_text";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-input-number-entity-row")
|
||||
class HuiInputNumberEntityRow extends LitElement implements LovelaceRow {
|
||||
@@ -63,9 +63,13 @@ class HuiInputNumberEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { handleAction } from "../common/handle-action";
|
||||
import { hasAction } from "../common/has-action";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-input-select-entity-row")
|
||||
@@ -60,9 +60,13 @@ class HuiInputSelectEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import { setValue } from "../../../data/input_text";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-input-text-entity-row")
|
||||
@@ -41,9 +41,13 @@ class HuiInputTextEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ import { UNAVAILABLE_STATES } from "../../../data/entity";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-lock-entity-row")
|
||||
@@ -42,9 +42,13 @@ class HuiLockEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ import {
|
||||
import type { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import type { EntityConfig, LovelaceRow } from "./types";
|
||||
import { installResizeObserver } from "../common/install-resize-observer";
|
||||
import { computeStateDisplay } from "../../../common/entity/compute_state_display";
|
||||
@@ -82,9 +82,13 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ import { activateScene } from "../../../data/scene";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { ActionRowConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-scene-entity-row")
|
||||
@@ -44,9 +44,13 @@ class HuiSceneEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ import { UNAVAILABLE_STATES } from "../../../data/entity";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { ActionRowConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-script-entity-row")
|
||||
@@ -43,9 +43,13 @@ class HuiScriptEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import "../components/hui-timestamp-display";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceRow } from "./types";
|
||||
import { EntitiesCardEntityConfig } from "../cards/types";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
@@ -52,9 +52,13 @@ class HuiSensorEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import { computeStateDisplay } from "../../../common/entity/compute_state_displa
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { LovelaceRow } from "./types";
|
||||
import { DOMAINS_HIDE_MORE_INFO } from "../../../common/const";
|
||||
import { computeDomain } from "../../../common/entity/compute_domain";
|
||||
@@ -49,9 +49,13 @@ class HuiTextEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import { timerTimeRemaining } from "../../../common/entity/timer_time_remaining"
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig } from "./types";
|
||||
|
||||
@customElement("hui-timer-entity-row")
|
||||
@@ -56,9 +56,13 @@ class HuiTimerEntityRow extends LitElement {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import { UNAVAILABLE_STATES } from "../../../data/entity";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import { EntityConfig, LovelaceRow } from "./types";
|
||||
|
||||
@customElement("hui-toggle-entity-row")
|
||||
@@ -41,9 +41,13 @@ class HuiToggleEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ import type { HomeAssistant, WeatherEntity } from "../../../types";
|
||||
import type { EntitiesCardEntityConfig } from "../cards/types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
import "../components/hui-warning";
|
||||
import type { LovelaceRow } from "./types";
|
||||
import { DOMAINS_HIDE_MORE_INFO } from "../../../common/const";
|
||||
import { computeDomain } from "../../../common/entity/compute_domain";
|
||||
@@ -62,9 +62,13 @@ class HuiWeatherEntityRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -23,10 +23,6 @@ export class HuiButtonsHeaderFooter extends LitElement
|
||||
|
||||
private _configEntities?: EntityConfig[];
|
||||
|
||||
public getCardSize(): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public setConfig(config: ButtonsHeaderFooterConfig): void {
|
||||
this._configEntities = processConfigEntities(config.entities);
|
||||
this.requestUpdate();
|
||||
|
@@ -40,10 +40,6 @@ export class HuiGraphHeaderFooter extends LitElement
|
||||
|
||||
private _fetching = false;
|
||||
|
||||
public getCardSize(): number {
|
||||
return 2;
|
||||
}
|
||||
|
||||
public setConfig(config: GraphHeaderFooterConfig): void {
|
||||
if (!config?.entity || config.entity.split(".")[0] !== "sensor") {
|
||||
throw new Error(
|
||||
|
@@ -35,10 +35,6 @@ export class HuiPictureHeaderFooter extends LitElement
|
||||
|
||||
@property() protected _config?: PictureHeaderFooterConfig;
|
||||
|
||||
public getCardSize(): number {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public setConfig(config: PictureHeaderFooterConfig): void {
|
||||
if (!config || !config.image) {
|
||||
throw new Error("Invalid Configuration: 'image' required");
|
||||
|
@@ -11,8 +11,8 @@ import {
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||
import "../components/hui-generic-entity-row";
|
||||
import "../components/hui-warning";
|
||||
import { AttributeRowConfig, LovelaceRow } from "../entity-rows/types";
|
||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||
|
||||
@customElement("hui-attribute-row")
|
||||
class HuiAttributeRow extends LitElement implements LovelaceRow {
|
||||
@@ -47,9 +47,13 @@ class HuiAttributeRow extends LitElement implements LovelaceRow {
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
<hui-warning>
|
||||
${createEntityNotFoundWarning(this.hass, this._config.entity)}
|
||||
</hui-warning>
|
||||
<hui-warning
|
||||
>${this.hass.localize(
|
||||
"ui.panel.lovelace.warning.entity_not_found",
|
||||
"entity",
|
||||
this._config.entity
|
||||
)}</hui-warning
|
||||
>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ export interface LovelaceCard extends HTMLElement {
|
||||
hass?: HomeAssistant;
|
||||
isPanel?: boolean;
|
||||
editMode?: boolean;
|
||||
getCardSize(): number | Promise<number>;
|
||||
getCardSize(): number;
|
||||
setConfig(config: LovelaceCardConfig): void;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ export interface LovelaceCardConstructor extends Constructor<LovelaceCard> {
|
||||
|
||||
export interface LovelaceHeaderFooter extends HTMLElement {
|
||||
hass?: HomeAssistant;
|
||||
getCardSize(): number | Promise<number>;
|
||||
setConfig(config: LovelaceHeaderFooterConfig): void;
|
||||
}
|
||||
|
||||
|
@@ -30,20 +30,20 @@ import { nextRender } from "../../../common/util/render-status";
|
||||
|
||||
let editCodeLoaded = false;
|
||||
|
||||
// Find column with < 5 size, else smallest column
|
||||
const getColumnIndex = (columnSizes: number[], size: number) => {
|
||||
// Find column with < 5 entities, else column with lowest count
|
||||
const getColumnIndex = (columnEntityCount: number[], size: number) => {
|
||||
let minIndex = 0;
|
||||
for (let i = 0; i < columnSizes.length; i++) {
|
||||
if (columnSizes[i] < 5) {
|
||||
for (let i = 0; i < columnEntityCount.length; i++) {
|
||||
if (columnEntityCount[i] < 5) {
|
||||
minIndex = i;
|
||||
break;
|
||||
}
|
||||
if (columnSizes[i] < columnSizes[minIndex]) {
|
||||
if (columnEntityCount[i] < columnEntityCount[minIndex]) {
|
||||
minIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
columnSizes[minIndex] += size;
|
||||
columnEntityCount[minIndex] += size;
|
||||
|
||||
return minIndex;
|
||||
};
|
||||
@@ -162,7 +162,7 @@ export class HUIView extends LitElement {
|
||||
|
||||
if (hassChanged && !configChanged) {
|
||||
this._cards.forEach((element) => {
|
||||
element.hass = hass;
|
||||
element.hass = this.hass;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -217,90 +217,68 @@ export class HUIView extends LitElement {
|
||||
root.style.display = elements.length > 0 ? "block" : "none";
|
||||
}
|
||||
|
||||
private async _createColumns() {
|
||||
private _createColumns() {
|
||||
this._createColumnsIteration++;
|
||||
const iteration = this._createColumnsIteration;
|
||||
const root = this.shadowRoot!.getElementById("columns")!;
|
||||
|
||||
// Remove old columns
|
||||
while (root.lastChild) {
|
||||
root.removeChild(root.lastChild);
|
||||
}
|
||||
|
||||
// Track the total height of cards in a columns
|
||||
const columnSizes: number[] = [];
|
||||
const columnElements: HTMLDivElement[] = [];
|
||||
// Add columns to DOM, limit number of columns to the number of cards
|
||||
for (let i = 0; i < Math.min(this.columns!, this._cards.length); i++) {
|
||||
const columnEl = document.createElement("div");
|
||||
columnEl.classList.add("column");
|
||||
root.appendChild(columnEl);
|
||||
columnSizes.push(0);
|
||||
columnElements.push(columnEl);
|
||||
let columns: [number, number][][] = [];
|
||||
const columnEntityCount: number[] = [];
|
||||
for (let i = 0; i < this.columns!; i++) {
|
||||
columns.push([]);
|
||||
columnEntityCount.push(0);
|
||||
}
|
||||
|
||||
let tillNextRender: Promise<unknown> | undefined;
|
||||
let start: Date | undefined;
|
||||
|
||||
// Calculate the size of every card and determine in what column it should go
|
||||
for (const [index, el] of this._cards.entries()) {
|
||||
if (tillNextRender === undefined) {
|
||||
// eslint-disable-next-line no-loop-func
|
||||
tillNextRender = nextRender().then(() => {
|
||||
tillNextRender = undefined;
|
||||
start = undefined;
|
||||
});
|
||||
}
|
||||
|
||||
let waitProm: Promise<unknown> | undefined;
|
||||
|
||||
// We should work for max 16ms (60fps) before allowing a frame to render
|
||||
if (start === undefined) {
|
||||
// Save the time we start for this frame, no need to wait yet
|
||||
start = new Date();
|
||||
} else if (new Date().getTime() - start.getTime() > 16) {
|
||||
// We are working too long, we will prevent a render, wait to allow for a render
|
||||
waitProm = tillNextRender;
|
||||
}
|
||||
|
||||
const cardSizeProm = computeCardSize(el);
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const [cardSize] = await Promise.all([cardSizeProm, waitProm]);
|
||||
|
||||
if (iteration !== this._createColumnsIteration) {
|
||||
// An other create columns is started, abort this one
|
||||
return;
|
||||
}
|
||||
// Calculate in wich column the card should go based on the size and the cards already in there
|
||||
this._addCardToColumn(
|
||||
columnElements[getColumnIndex(columnSizes, cardSize as number)],
|
||||
index,
|
||||
this.lovelace!.editMode
|
||||
this._cards.forEach((el, index) => {
|
||||
const cardSize = computeCardSize(
|
||||
(el.tagName === "HUI-CARD-OPTIONS" ? el.firstChild : el) as LovelaceCard
|
||||
);
|
||||
}
|
||||
columns[getColumnIndex(columnEntityCount, cardSize)].push([
|
||||
index,
|
||||
cardSize,
|
||||
]);
|
||||
});
|
||||
|
||||
// Remove empty columns
|
||||
columnElements.forEach((column) => {
|
||||
if (!column.lastChild) {
|
||||
column.parentElement!.removeChild(column);
|
||||
}
|
||||
columns = columns.filter((val) => val.length > 0);
|
||||
|
||||
columns.forEach((indexes) => {
|
||||
const columnEl = document.createElement("div");
|
||||
columnEl.classList.add("column");
|
||||
this._addToColumn(columnEl, indexes, this.lovelace!.editMode, iteration);
|
||||
root.appendChild(columnEl);
|
||||
});
|
||||
}
|
||||
|
||||
private _addCardToColumn(columnEl, index, editMode) {
|
||||
const card: LovelaceCard = this._cards[index];
|
||||
if (!editMode) {
|
||||
card.editMode = false;
|
||||
columnEl.appendChild(card);
|
||||
} else {
|
||||
const wrapper = document.createElement("hui-card-options");
|
||||
wrapper.hass = this.hass;
|
||||
wrapper.lovelace = this.lovelace;
|
||||
wrapper.path = [this.index!, index];
|
||||
card.editMode = true;
|
||||
wrapper.appendChild(card);
|
||||
columnEl.appendChild(wrapper);
|
||||
private async _addToColumn(columnEl, indexes, editMode, iteration) {
|
||||
let i = 0;
|
||||
for (const [index, cardSize] of indexes) {
|
||||
const card: LovelaceCard = this._cards[index];
|
||||
if (!editMode) {
|
||||
card.editMode = false;
|
||||
columnEl.appendChild(card);
|
||||
} else {
|
||||
const wrapper = document.createElement("hui-card-options");
|
||||
wrapper.hass = this.hass;
|
||||
wrapper.lovelace = this.lovelace;
|
||||
wrapper.path = [this.index!, index];
|
||||
card.editMode = true;
|
||||
wrapper.appendChild(card);
|
||||
columnEl.appendChild(wrapper);
|
||||
}
|
||||
i += cardSize;
|
||||
if (i > 5) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await nextRender();
|
||||
if (iteration !== this._createColumnsIteration) {
|
||||
return;
|
||||
}
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,6 +295,7 @@ export class HUIView extends LitElement {
|
||||
});
|
||||
|
||||
this._cards = elements;
|
||||
|
||||
this._createColumns();
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,6 @@ import {
|
||||
subscribeConfig,
|
||||
subscribeEntities,
|
||||
subscribeServices,
|
||||
HassConfig,
|
||||
} from "home-assistant-js-websocket";
|
||||
import { fireEvent } from "../common/dom/fire_event";
|
||||
import { broadcastConnectionStatus } from "../data/connection-status";
|
||||
@@ -157,15 +156,8 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
|
||||
|
||||
protected hassReconnected() {
|
||||
super.hassReconnected();
|
||||
|
||||
this._updateHass({ connected: true });
|
||||
broadcastConnectionStatus("connected");
|
||||
|
||||
// on reconnect always fetch config as we might miss an update while we were disconnected
|
||||
// @ts-ignore
|
||||
this.hass!.callWS({ type: "get_config" }).then((config: HassConfig) => {
|
||||
this._updateHass({ config });
|
||||
});
|
||||
}
|
||||
|
||||
protected hassDisconnected() {
|
||||
|
@@ -1,11 +1,6 @@
|
||||
import { Constructor } from "../types";
|
||||
import { showToast } from "../util/toast";
|
||||
import { HassBaseEl } from "./hass-base-mixin";
|
||||
import {
|
||||
STATE_NOT_RUNNING,
|
||||
STATE_STARTING,
|
||||
STATE_RUNNING,
|
||||
} from "home-assistant-js-websocket";
|
||||
|
||||
export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
|
||||
class extends superClass {
|
||||
@@ -17,38 +12,9 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
|
||||
);
|
||||
}
|
||||
|
||||
updated(changedProperties) {
|
||||
super.updated(changedProperties);
|
||||
const oldHass = changedProperties.get("hass");
|
||||
if (
|
||||
!changedProperties.has("hass") ||
|
||||
oldHass?.config?.state === this.hass!.config.state
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (this.hass!.config.state === STATE_NOT_RUNNING) {
|
||||
showToast(this, {
|
||||
message:
|
||||
this.hass!.localize("ui.notification_toast.starting") ||
|
||||
"Home Assistant is starting, not everything will be available until it is finished.",
|
||||
duration: 0,
|
||||
dismissable: false,
|
||||
});
|
||||
} else if (
|
||||
oldHass?.config &&
|
||||
oldHass.config.state === STATE_NOT_RUNNING &&
|
||||
(this.hass!.config.state === STATE_STARTING ||
|
||||
this.hass!.config.state === STATE_RUNNING)
|
||||
) {
|
||||
showToast(this, {
|
||||
message: this.hass!.localize("ui.notification_toast.started"),
|
||||
duration: 5000,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected hassReconnected() {
|
||||
super.hassReconnected();
|
||||
|
||||
showToast(this, {
|
||||
message: "",
|
||||
duration: 1,
|
||||
|
@@ -245,8 +245,7 @@
|
||||
"no": "No",
|
||||
"successfully_saved": "Successfully saved",
|
||||
"successfully_deleted": "Successfully deleted",
|
||||
"back": "Back",
|
||||
"error_required": "Required"
|
||||
"back": "Back"
|
||||
},
|
||||
"components": {
|
||||
"entity": {
|
||||
@@ -499,8 +498,6 @@
|
||||
"notification_toast": {
|
||||
"service_call_failed": "Failed to call service {service}.",
|
||||
"connection_lost": "Connection lost. Reconnecting…",
|
||||
"started": "Home Assistant has started!",
|
||||
"starting": "Home Assistant is starting, not everything will be available until it is finished.",
|
||||
"triggered": "Triggered {name}"
|
||||
},
|
||||
"sidebar": {
|
||||
@@ -721,8 +718,7 @@
|
||||
"description": "Customize your entities",
|
||||
"picker": {
|
||||
"header": "Customizations",
|
||||
"introduction": "Tweak per-entity attributes. Added/edited customizations will take effect immediately. Removed customizations will take effect when the entity is updated.",
|
||||
"entity": "Entity"
|
||||
"introduction": "Tweak per-entity attributes. Added/edited customizations will take effect immediately. Removed customizations will take effect when the entity is updated."
|
||||
},
|
||||
"warning": {
|
||||
"include_sentence": "It seems that your configuration.yaml doesn't properly",
|
||||
@@ -1432,7 +1428,6 @@
|
||||
"users": {
|
||||
"caption": "Users",
|
||||
"description": "Manage users",
|
||||
"users_privileges_note": "The users group is a work in progress. The user will be unable to administer the instance via the UI. We're still auditing all management API endpoints to ensure that they correctly limit access to administrators.",
|
||||
"picker": {
|
||||
"headers": { "name": "Name", "group": "Group", "system": "System" }
|
||||
},
|
||||
@@ -1573,33 +1568,9 @@
|
||||
"header": "Z-Wave Network Management",
|
||||
"introduction": "Run commands that affect the Z-Wave network. You won't get feedback on whether most commands succeeded, but you can check the OZW Log to try to find out."
|
||||
},
|
||||
"node_management": {
|
||||
"header": "Z-Wave Node Management",
|
||||
"introduction": "Run Z-Wave commands that affect a single node. Pick a node to see a list of available commands.",
|
||||
"nodes": "Nodes",
|
||||
"nodes_hint": "Select node to view per-node options",
|
||||
"entities": "Entities of this node",
|
||||
"entity_info": "Entity Information",
|
||||
"exclude_entity": "Exclude this entity from Home Assistant",
|
||||
"pooling_intensity": "Polling intensity",
|
||||
"node_protection": "Node protection",
|
||||
"protection": "Protection",
|
||||
"set_protection": "Set Protection",
|
||||
"node_group_associations": "Node group associations",
|
||||
"group": "Group",
|
||||
"node_to_control": "Node to control",
|
||||
"nodes_in_group": "Other Nodes in this group:",
|
||||
"max_associations": "Max Associations:",
|
||||
"add_to_group": "Add To Group",
|
||||
"remove_from_group": "Remove From Group",
|
||||
"remove_broadcast": "Remove Broadcast"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "OZW Log",
|
||||
"introduction": "View the log. 0 is the minimum (loads entire log) and 1000 is the maximum. Load will show a static log and tail will auto update with the last specified number of lines of the log.",
|
||||
"last_log_lines": "Number of last log lines",
|
||||
"load": "Load",
|
||||
"tail": "Tail"
|
||||
"introduction": "View the log. 0 is the minimum (loads entire log) and 1000 is the maximum. Load will show a static log and tail will auto update with the last specified number of lines of the log."
|
||||
},
|
||||
"network_status": {
|
||||
"network_stopped": "Z-Wave Network Stopped",
|
||||
@@ -1632,15 +1603,7 @@
|
||||
"add_node_secure": "Add Node Secure",
|
||||
"add_node": "Add Node",
|
||||
"remove_node": "Remove Node",
|
||||
"cancel_command": "Cancel Command",
|
||||
"refresh_node": "Refresh Node",
|
||||
"remove_failed_node": "Remove Failed Node",
|
||||
"replace_failed_node": "Replace Failed Node",
|
||||
"print_node": "Print Node",
|
||||
"heal_node": "Heal Node",
|
||||
"test_node": "Test Node",
|
||||
"node_info": "Node Information",
|
||||
"refresh_entity": "Refresh Entity"
|
||||
"cancel_command": "Cancel Command"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1681,9 +1644,6 @@
|
||||
"safe-mode": {
|
||||
"header": "Safe Mode Activated",
|
||||
"description": "Home Assistant ran into trouble while loading your configuration and is now running in safe mode. Take a look at the error log to see what went wrong."
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant is starting, please wait..."
|
||||
}
|
||||
},
|
||||
"unused_entities": {
|
||||
@@ -1976,8 +1936,7 @@
|
||||
"attribute_not_found": "Attribute {attribute} not available in: {entity}",
|
||||
"entity_not_found": "Entity not available: {entity}",
|
||||
"entity_non_numeric": "Entity is non-numeric: {entity}",
|
||||
"entity_unavailable": "{entity} is currently unavailable",
|
||||
"starting": "Home Assistant is starting, not everything may be available yet"
|
||||
"entity_unavailable": "{entity} is currently unavailable"
|
||||
},
|
||||
"changed_toast": {
|
||||
"message": "The Lovelace UI configuration for this dashboard was updated, refresh to see changes?",
|
||||
|
@@ -474,7 +474,6 @@
|
||||
},
|
||||
"common": {
|
||||
"and": "i",
|
||||
"back": "Torna",
|
||||
"cancel": "Cancel·la",
|
||||
"close": "Tanca",
|
||||
"delete": "Elimina",
|
||||
@@ -506,7 +505,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Esborra",
|
||||
"device": "Dispositiu",
|
||||
"no_area": "Sense àrees",
|
||||
"show_devices": "Mostra dispositius",
|
||||
"toggle": "Commuta"
|
||||
},
|
||||
@@ -575,7 +573,7 @@
|
||||
"unavailable": "Aquesta entitat no està disponible actualment.",
|
||||
"update": "Actualitza"
|
||||
},
|
||||
"no_unique_id": "Aquesta entitat no té un ID únic, per tant, la seva configuració no pot ser gestionada des de la interfície d'usuari.",
|
||||
"no_unique_id": "Aquesta entitat no té un ID únic, per tant, no pot ser configurada des de la interfície d'usuari.",
|
||||
"related": "Relacionat",
|
||||
"settings": "Configuració"
|
||||
},
|
||||
@@ -602,7 +600,7 @@
|
||||
"min": "Valor mínim",
|
||||
"mode": "Mode de visualització",
|
||||
"slider": "Barra lliscant",
|
||||
"step": "Mida del pas",
|
||||
"step": "Pas de la barra lliscant",
|
||||
"unit_of_measurement": "Unitat de mesura"
|
||||
},
|
||||
"input_select": {
|
||||
@@ -740,8 +738,6 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Connexió perduda. Tornant a connectar...",
|
||||
"service_call_failed": "Ha fallat la crida al servei {service}.",
|
||||
"started": "Home Assistant s'ha iniciat!",
|
||||
"starting": "Home Assistant està iniciant-se, no estarà tot disponible fins que acabi",
|
||||
"triggered": "{name} disparat/ada"
|
||||
},
|
||||
"panel": {
|
||||
@@ -766,13 +762,9 @@
|
||||
},
|
||||
"description": "Visió general de totes les àrees de la casa.",
|
||||
"editor": {
|
||||
"area_id": "ID d'àrea",
|
||||
"create": "Crea",
|
||||
"default_name": "Nova àrea",
|
||||
"delete": "Elimina",
|
||||
"name": "Nom",
|
||||
"name_required": "Nom obligatori",
|
||||
"unknown_error": "Error desconegut",
|
||||
"update": "Actualitza"
|
||||
},
|
||||
"picker": {
|
||||
@@ -807,7 +799,6 @@
|
||||
"label": "Retard"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Acció",
|
||||
"extra_fields": {
|
||||
"code": "Codi"
|
||||
},
|
||||
@@ -849,7 +840,6 @@
|
||||
"label": "I (AND lògic)"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Condició",
|
||||
"extra_fields": {
|
||||
"above": "A sobre",
|
||||
"below": "A sota",
|
||||
@@ -928,8 +918,7 @@
|
||||
"below": "A sota",
|
||||
"for": "Durada"
|
||||
},
|
||||
"label": "Dispositiu",
|
||||
"trigger": "Disparador"
|
||||
"label": "Dispositiu"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Dades de l'esdeveniment",
|
||||
@@ -1257,7 +1246,6 @@
|
||||
"integration": "Integració",
|
||||
"manufacturer": "Fabricant",
|
||||
"model": "Model",
|
||||
"no_area": "Sense àrees",
|
||||
"no_devices": "Sense dispositius"
|
||||
},
|
||||
"delete": "Elimina",
|
||||
@@ -1322,7 +1310,7 @@
|
||||
"button": "Elimina seleccionada/es",
|
||||
"confirm_partly_text": "Només pots eliminar {removable} de les {selected} entitats seleccionades. Les entitats només es poden eliminar quan la integració ja no les està proporcionant.\nA vegades pot ser que hagis de reiniciar Home Assistant per poder eliminar les entitats d'una antiga integració eliminada. Segur que vols eliminar les entitats?",
|
||||
"confirm_partly_title": "Només es poden eliminar {number} entitats seleccionades.",
|
||||
"confirm_text": "Les hauries d'eliminar de la configuració Lovelace i de les automatitzacions si contenen aquestes entitats.",
|
||||
"confirm_text": "Les entitats només poden eliminar-se quan la seva integració ja no les està proporcionant.",
|
||||
"confirm_title": "Vols eliminar {number} entitat/s?"
|
||||
},
|
||||
"selected": "{number} seleccionada/es",
|
||||
@@ -1440,7 +1428,7 @@
|
||||
"caption": "Panells Lovelace",
|
||||
"dashboards": {
|
||||
"cant_edit_default": "El panell Lovelace estàndard no pot ser editat des de la interfície d'usuari. El pots amagar configurant-ne un altre com a panell per defecte.",
|
||||
"cant_edit_yaml": "Els panells Lovelace definits en YAML no poden ser editats des de la interfñicie d'usuari. Edita'ls des de 'configuration.yaml'.",
|
||||
"cant_edit_yaml": "Els panells Lovelace definits en YAML no poden ser editats des de la interfñicie d'usuari. Configura'ls des de configuration.yaml.",
|
||||
"caption": "Panells",
|
||||
"conf_mode": {
|
||||
"storage": "Controlat per la UI",
|
||||
@@ -1480,7 +1468,7 @@
|
||||
},
|
||||
"description": "Configura els teus panells Lovelace",
|
||||
"resources": {
|
||||
"cant_edit_yaml": "Estàs utilitzant Lovelace en mode YAML per tant no pots gestionar els recursos des de la interfície d'usuari. Els pots gestionar des del fitxer 'configuration.yaml'.",
|
||||
"cant_edit_yaml": "Estàs utilitzant el mode YAML per tant no pots gestionar els recursos des de la interfície d'usuari. Els pots gestionar dins el fitxer 'configuration.yaml'.",
|
||||
"caption": "Recursos",
|
||||
"confirm_delete": "Estàs segur que vols eliminar aquest recurs?",
|
||||
"detail": {
|
||||
@@ -1556,7 +1544,7 @@
|
||||
"delete": "Elimina l'entitat",
|
||||
"device_entities": "Si afegeixes una entitat que pertany a un dispositiu, s'afegirà el dispositiu.",
|
||||
"header": "Entitats",
|
||||
"introduction": "Les entitats que no pertanyen a un dispositiu es poden configurar aquí.",
|
||||
"introduction": "Les entitats que no pertanyen a cap dispositiu es poden configurar aquí.",
|
||||
"without_device": "Entitats sense dispositiu"
|
||||
},
|
||||
"introduction": "Utilitza les escenes per donar més vida a la teva llar.",
|
||||
@@ -1618,10 +1606,10 @@
|
||||
"section": {
|
||||
"reloading": {
|
||||
"automation": "Actualitza automatitzacions",
|
||||
"core": "Actualitza ubicació i personalitzacions",
|
||||
"core": "Recarrega ubicacions i automatitzacions",
|
||||
"group": "Actualitza grups",
|
||||
"heading": "Tornant a carregar la configuració",
|
||||
"introduction": "Algunes parts de Home Assistant es poden actualitzar sense necessitat reiniciar-lo. Si prems actualitza s'esborrarà la configuració YAML actual i se'n carregarà la nova.",
|
||||
"introduction": "Algunes parts de la configuració de Home Assistant es poden recarregar sense necessitat de reiniciar. Els botons de sota esborraran la configuració antiga i en carregaran la nova.",
|
||||
"person": "Actualitza persones",
|
||||
"scene": "Actualitza escenes",
|
||||
"script": "Actualitza programes",
|
||||
@@ -1841,53 +1829,21 @@
|
||||
"set_wakeup": "Estableix l'interval en despertar",
|
||||
"true": "Cert"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Afegeix a grup",
|
||||
"entities": "Entitats d'aquest node",
|
||||
"entity_info": "Informació de l'entitat",
|
||||
"exclude_entity": "Exclou aquesta entitat de Home Assistant",
|
||||
"group": "Grup",
|
||||
"header": "Gestió de nodes Z-Wave",
|
||||
"introduction": "Executa ordres Z-Wave que afecten un sol node. Tria un node per veure la llista d'ordres/comandes disponibles.",
|
||||
"max_associations": "Associacions màximes:",
|
||||
"node_group_associations": "Associacions de grup de nodes",
|
||||
"node_protection": "Protecció de node",
|
||||
"node_to_control": "Node a controlar",
|
||||
"nodes": "Nodes",
|
||||
"nodes_hint": "Selecciona un node per visualitzar-ne les seves opcions",
|
||||
"nodes_in_group": "Altres nodes en aquest grup:",
|
||||
"pooling_intensity": "Intensitat de sondeig",
|
||||
"protection": "Protecció",
|
||||
"remove_broadcast": "Elimina la difusió/broadcast",
|
||||
"remove_from_group": "Elimina de grup",
|
||||
"set_protection": "Estableix protecció"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "Registre d'OZW",
|
||||
"introduction": "Consulta el registre. 0 és el mínim (carrega el registre complet) i 1000 és el màxim. La càrrega mostrarà un registre estàtic i la cua s'actualitzarà automàticament amb l'últim número de línies especificat.",
|
||||
"last_log_lines": "Nombre d'últimes línies de registre",
|
||||
"load": "Carrega",
|
||||
"tail": "Cua"
|
||||
"introduction": "Consulta el registre. 0 és el mínim (carrega el registre complet) i 1000 és el màxim. La càrrega mostrarà un registre estàtic i la cua s'actualitzarà automàticament amb l'últim número de línies especificat."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Afegeix node",
|
||||
"add_node_secure": "Afegeix node amb seguretat",
|
||||
"cancel_command": "Cancel·lar ordre",
|
||||
"heal_network": "Guareix la xarxa",
|
||||
"heal_node": "Guareix node",
|
||||
"node_info": "Informació de node",
|
||||
"print_node": "Imprimeix node",
|
||||
"refresh_entity": "Actualitza l'entitat",
|
||||
"refresh_node": "Actualitza node",
|
||||
"remove_failed_node": "Elimina node fallit",
|
||||
"remove_node": "Elimina node",
|
||||
"replace_failed_node": "Substitueix node fallit",
|
||||
"save_config": "Desa la configuració",
|
||||
"soft_reset": "Reinici suau",
|
||||
"start_network": "Inicia la xarxa",
|
||||
"stop_network": "Atura la xarxa",
|
||||
"test_network": "Prova la xarxa",
|
||||
"test_node": "Prova node"
|
||||
"test_network": "Prova la xarxa"
|
||||
},
|
||||
"values": {
|
||||
"header": "Valors dels node"
|
||||
@@ -2046,10 +2002,6 @@
|
||||
"add_item": "Afegir element",
|
||||
"checked_items": "Articles seleccionats",
|
||||
"clear_items": "Esborrar els articles seleccionats"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant està iniciant-se, espera un moment.",
|
||||
"header": "Home Assistant està iniciant-se..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2227,7 +2179,7 @@
|
||||
},
|
||||
"edit_card": {
|
||||
"add": "Afegir targeta",
|
||||
"delete": "Elimina targeta",
|
||||
"delete": "Elimina",
|
||||
"duplicate": "Duplica targeta",
|
||||
"edit": "Editar",
|
||||
"header": "Configuració de la targeta",
|
||||
@@ -2267,7 +2219,7 @@
|
||||
"migrate": {
|
||||
"header": "Configuració incompatible",
|
||||
"migrate": "Migrar la configuració",
|
||||
"para_migrate": "Home Assistant pot afegir ID's a totes les targetes i visualitzacions automàticament fent clic al botó 'Migrar la configuració'.",
|
||||
"para_migrate": "Home Assistant pot afegir ID's a totes les vostres targetes i visualitzacions automàticament fent clic al botó \"Migrar la configuració\".",
|
||||
"para_no_id": "Aquest element no té ID. Afegeix un ID per aquest element a 'ui-lovelace.yaml'."
|
||||
},
|
||||
"raw_editor": {
|
||||
@@ -2290,12 +2242,12 @@
|
||||
"close": "Tanca",
|
||||
"empty_config": "Comença amb un panell buit",
|
||||
"header": "Pren el control de la interfície d'usuari Lovelace",
|
||||
"para": "Aquest panell Lovelace s'està gestionant per Home Assistant. S'actualitza automàticament quan hi ha noves entitats o nous components de Lovelace disponibles. Si prens el control, aquest panell no s'actualitzarà automàticament. Sempre pots crear un nou panell a configuració i fer-hi proves.",
|
||||
"para": "De manera predeterminada, Home Assistant mantindrà al dia la teva interfície d'usuari, actualitzant-la quan hi hagi noves entitats o nous components de Lovelace disponibles. Si prens el control, ja no es faran aquests canvis automàticament.",
|
||||
"para_sure": "Estàs segur que vols prendre el control de la interfície d'usuari?",
|
||||
"save": "Prendre el control",
|
||||
"yaml_config": "Per ajudar a familiaritzar-te, aquí tens la configuració actual del teu panell Lovelace:",
|
||||
"yaml_control": "Per configurar el panell en mode YAML, crea un fitxer YAML amb el nom que hagis establert a la configuració del panell, o bé el nom per defecte 'ui-lovelace.yaml'.",
|
||||
"yaml_mode": "Estàs utilitzant el mode YAML per aquest panell, per tant no pots editar-lo des de la interfície d'usuari. Si vols poder editar-lo des de la UI, elimina 'mode: yaml' del fitxer 'configuration.yaml' en l'apartat de configuració de Lovelace."
|
||||
"yaml_mode": "Estàs utilitzant el mode YAML per tant no pots editar el panell Lovelace des de la interfície d'usuari. Si vols poder editar-lo des de la UI, elimina la línia 'mode: yaml' del fitxer 'configuration.yaml' en l'apartat de configuració de Lovelace."
|
||||
},
|
||||
"suggest_card": {
|
||||
"add": "Afegeix a la UI Lovelace",
|
||||
@@ -2318,7 +2270,7 @@
|
||||
"refresh": "Actualitzar",
|
||||
"reload_resources": "Actualitza recursos"
|
||||
},
|
||||
"reload_lovelace": "Actualiza la interfície d'usuari",
|
||||
"reload_lovelace": "Recarrega Lovelace",
|
||||
"reload_resources": {
|
||||
"refresh_body": "Has d'actualitzar la pàgina per completar la càrrega. Vols actualitzar-la ara?",
|
||||
"refresh_header": "Vols actualitzar?"
|
||||
@@ -2342,8 +2294,7 @@
|
||||
"attribute_not_found": "L'atribut {attribute} de {entity} no és disponible.",
|
||||
"entity_non_numeric": "Entitat no numèrica: {entity}",
|
||||
"entity_not_found": "Entitat no disponible: {entity}",
|
||||
"entity_unavailable": "{entity} no està disponible actualment",
|
||||
"starting": "Home Assistant està iniciant-se, pot ser que encara no estigui tot disponible"
|
||||
"entity_unavailable": "{entity} no està disponible actualment"
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
@@ -2528,7 +2479,7 @@
|
||||
},
|
||||
"profile": {
|
||||
"advanced_mode": {
|
||||
"description": "Desbloqueja funcions avançades.",
|
||||
"description": "Home Assistant oculta de manera predeterminada les funcions i opcions avançades. Pots accedir a aquestes funcions commutant aquest interruptor. Aquesta és una configuració específica per a usuari i no afecta altres usuaris que utilitzin Home Assistant.",
|
||||
"link_promo": "Més informació",
|
||||
"title": "Mode avançat"
|
||||
},
|
||||
|
@@ -467,22 +467,15 @@
|
||||
"wnw": "ZSZ",
|
||||
"wsw": "ZJZ"
|
||||
},
|
||||
"forecast": "Předpověď",
|
||||
"high": "Vysoká",
|
||||
"low": "Nízká"
|
||||
"forecast": "Předpověď"
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
"and": "a",
|
||||
"back": "Zpět",
|
||||
"cancel": "Zrušit",
|
||||
"close": "Zavřít",
|
||||
"delete": "Smazat",
|
||||
"loading": "Načítání",
|
||||
"next": "Další",
|
||||
"no": "Ne",
|
||||
"previous": "Předchozí",
|
||||
"refresh": "Obnovit",
|
||||
"save": "Uložit",
|
||||
"successfully_deleted": "Úspěšně smazáno",
|
||||
"successfully_saved": "Úspěšně uloženo",
|
||||
@@ -506,7 +499,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Zrušit",
|
||||
"device": "Zařízení",
|
||||
"no_area": "Žádná oblast",
|
||||
"show_devices": "Zobrazit zařízení",
|
||||
"toggle": "Přepnout"
|
||||
},
|
||||
@@ -740,15 +732,9 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Připojení bylo ztraceno. Připojuji se znovu...",
|
||||
"service_call_failed": "Službu {service} se nepodařilo zavolat.",
|
||||
"started": "Home Assistant je spuštěn!",
|
||||
"starting": "Home Assistant se spouští, ne všechno bude k dispozici, dokud nebude spuštění dokončeno.",
|
||||
"triggered": "Spuštěno {name}"
|
||||
},
|
||||
"panel": {
|
||||
"calendar": {
|
||||
"my_calendars": "Moje kalendáře",
|
||||
"today": "Dnes"
|
||||
},
|
||||
"config": {
|
||||
"advanced_mode": {
|
||||
"hint_enable": "Chybí vám možnosti konfigurace? Zapněte rozšířený režim",
|
||||
@@ -766,13 +752,9 @@
|
||||
},
|
||||
"description": "Přehled všech oblastí ve vaší domácnosti.",
|
||||
"editor": {
|
||||
"area_id": "ID oblasti",
|
||||
"create": "VYTVOŘIT",
|
||||
"default_name": "Nová oblast",
|
||||
"delete": "Odstranit",
|
||||
"name": "Název",
|
||||
"name_required": "Název je povinný",
|
||||
"unknown_error": "Neznámá chyba",
|
||||
"update": "UPRAVIT"
|
||||
},
|
||||
"picker": {
|
||||
@@ -807,7 +789,6 @@
|
||||
"label": "Zpoždění"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Akce",
|
||||
"extra_fields": {
|
||||
"code": "Kód"
|
||||
},
|
||||
@@ -849,7 +830,6 @@
|
||||
"label": "A"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Podmínka",
|
||||
"extra_fields": {
|
||||
"above": "Větší než",
|
||||
"below": "Menší než",
|
||||
@@ -857,9 +837,6 @@
|
||||
},
|
||||
"label": "Zařízení"
|
||||
},
|
||||
"not": {
|
||||
"label": "Ne"
|
||||
},
|
||||
"numeric_state": {
|
||||
"above": "Větší než",
|
||||
"below": "Menší než",
|
||||
@@ -928,8 +905,7 @@
|
||||
"below": "Menší než",
|
||||
"for": "Doba trvání"
|
||||
},
|
||||
"label": "Zařízení",
|
||||
"trigger": "Spouštěč"
|
||||
"label": "Zařízení"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Data události",
|
||||
@@ -1192,9 +1168,7 @@
|
||||
"edit_requires_storage": "Editor je zakázán, protože konfigurace je uložena v configuration.yaml.",
|
||||
"elevation": "Nadmořská výška",
|
||||
"elevation_meters": "metrů",
|
||||
"external_url": "Externí adresa URL",
|
||||
"imperial_example": "Stupně Fahrenheita, libry",
|
||||
"internal_url": "Interní adresa URL",
|
||||
"latitude": "Zeměpisná šířka",
|
||||
"location_name": "Název instalace Home Assistant",
|
||||
"longitude": "Zeměpisná délka",
|
||||
@@ -1257,17 +1231,14 @@
|
||||
"integration": "Integrace",
|
||||
"manufacturer": "Výrobce",
|
||||
"model": "Model",
|
||||
"no_area": "Žádná oblast",
|
||||
"no_devices": "Žádná zařízení"
|
||||
},
|
||||
"delete": "Odstranit",
|
||||
"description": "Správa připojených zařízení",
|
||||
"device_info": "Informace o zařízení",
|
||||
"device_not_found": "Zařízení nebylo nalezeno.",
|
||||
"entities": {
|
||||
"add_entities_lovelace": "Přidat všechny entity zařízení do Lovelace",
|
||||
"entities": "Entity",
|
||||
"hide_disabled": "Skrýt zakázané",
|
||||
"none": "Toto zařízení nemá žádné entity"
|
||||
},
|
||||
"name": "Jméno",
|
||||
@@ -1385,8 +1356,7 @@
|
||||
"restart_confirm": "Restartujte Home Assistant pro odstranění této integrace",
|
||||
"settings_button": "Upravit nastavení pro {integration}",
|
||||
"system_options": "Systémové možnosti pro {integration}",
|
||||
"system_options_button": "Systémové možnosti pro {integration}",
|
||||
"unnamed_entry": "Nepojmenovaný záznam"
|
||||
"system_options_button": "Systémové možnosti pro {integration}"
|
||||
},
|
||||
"config_flow": {
|
||||
"aborted": "Přerušeno",
|
||||
@@ -1838,51 +1808,21 @@
|
||||
"set_wakeup": "Nastavit interval probuzení",
|
||||
"true": "True"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Přidat do skupiny",
|
||||
"entities": "Entity tohoto uzlu",
|
||||
"entity_info": "Informace o entitě",
|
||||
"exclude_entity": "Vyloučit tuto entitu z Home Assistant",
|
||||
"group": "Skupina",
|
||||
"header": "Správa uzlů Z-Wave",
|
||||
"introduction": "Spusťte příkazy Z-Wave, které ovlivňují jediný uzel. Vyberte uzel pro zobrazení seznamu dostupných příkazů.",
|
||||
"max_associations": "Maximální počet asociací:",
|
||||
"node_group_associations": "Přidružení skupiny uzlů",
|
||||
"node_protection": "Ochrana uzlu",
|
||||
"node_to_control": "Uzel k řízení",
|
||||
"nodes": "Uzly",
|
||||
"nodes_hint": "Vyberte uzel pro zobrazení možností daného uzlu",
|
||||
"nodes_in_group": "Další uzly v této skupině:",
|
||||
"pooling_intensity": "Intenzita dotazování",
|
||||
"protection": "Ochrana",
|
||||
"remove_broadcast": "Odebrat vysílání",
|
||||
"remove_from_group": "Odebrat ze skupiny",
|
||||
"set_protection": "Nastavit ochranu"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "Protokol OZW",
|
||||
"introduction": "Zobrazit protokol. 0 je minimum (načte celý protokol) a 1000 je maximum. Načíst zobrazí statický protokol a tail automaticky aktualizuje protokol s naposledy zvoleným počtem řádků.",
|
||||
"last_log_lines": "Počet řádků posledního protokolu",
|
||||
"load": "Načíst"
|
||||
"introduction": "Zobrazit protokol. 0 je minimum (načte celý protokol) a 1000 je maximum. Načíst zobrazí statický protokol a tail automaticky aktualizuje protokol s naposledy zvoleným počtem řádků."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Přidat uzel",
|
||||
"add_node_secure": "Přidat zabezpečený uzel",
|
||||
"cancel_command": "Zrušit příkaz",
|
||||
"heal_network": "Vyléčit síť",
|
||||
"heal_node": "Uzdravit uzel",
|
||||
"node_info": "Informace o uzlu",
|
||||
"refresh_entity": "Znovu načíst Entitu",
|
||||
"refresh_node": "Obnovit uzel",
|
||||
"remove_failed_node": "Odebrat selhaný uzel",
|
||||
"remove_node": "Odebrat uzel",
|
||||
"replace_failed_node": "Nahradit selhaný uzel",
|
||||
"save_config": "Uložit konfiguraci",
|
||||
"soft_reset": "Měkký reset",
|
||||
"start_network": "Spustit síť",
|
||||
"stop_network": "Zastavit síť",
|
||||
"test_network": "Testovat síť",
|
||||
"test_node": "Otestovat uzel"
|
||||
"test_network": "Testovat síť"
|
||||
},
|
||||
"values": {
|
||||
"header": "Hodnoty uzlu"
|
||||
@@ -1920,13 +1860,10 @@
|
||||
"built_using": "Sestaveno pomocí",
|
||||
"custom_uis": "Vlastní uživatelská rozhraní:",
|
||||
"developed_by": "Vyvinuto partou úžasných lidí.",
|
||||
"documentation": "Dokumentace",
|
||||
"frontend": "frontend-ui",
|
||||
"frontend_version": "Verze rozhraní frontend: {version} - {type}",
|
||||
"home_assistant_logo": "Home Assistant logo",
|
||||
"icons_by": "Ikony od",
|
||||
"integrations": "Integrace",
|
||||
"issues": "Problémy",
|
||||
"license": "Publikováno pod licencí Apache 2.0",
|
||||
"path_configuration": "Cesta k souboru configuration.yaml: {path}",
|
||||
"server": "server",
|
||||
@@ -2041,10 +1978,6 @@
|
||||
"add_item": "Přidat položku",
|
||||
"checked_items": "Označené položky",
|
||||
"clear_items": "Vymazat označené položky"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant se spouští, čekejte prosím.",
|
||||
"header": "Home Assistant se spouští..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2121,7 +2054,6 @@
|
||||
"name": "Název",
|
||||
"no_theme": "Žádný motiv",
|
||||
"refresh_interval": "Interval obnovení",
|
||||
"secondary_info_attribute": "Sekundární informační atribut",
|
||||
"show_icon": "Zobrazit ikonu?",
|
||||
"show_name": "Zobrazit název?",
|
||||
"show_state": "Zobrazit stav?",
|
||||
@@ -2212,8 +2144,7 @@
|
||||
},
|
||||
"weather-forecast": {
|
||||
"description": "Karta Předpověď počasí zobrazuje počasí. Velmi užitečná pro použití v rozhraní, které lidé zobrazují na zdi.",
|
||||
"name": "Předpověď počasí",
|
||||
"show_forecast": "Zobrazit předpověď"
|
||||
"name": "Předpověď počasí"
|
||||
}
|
||||
},
|
||||
"cardpicker": {
|
||||
@@ -2337,8 +2268,7 @@
|
||||
"attribute_not_found": "Atribut {attribute} není k dispozici v: {entity}",
|
||||
"entity_non_numeric": "Entita není číselná: {entity}",
|
||||
"entity_not_found": "Entita není k dispozici: {entity}",
|
||||
"entity_unavailable": "Entita {entity} není aktuálně k dispozici.",
|
||||
"starting": "Home Assistant se spouští, vše ještě nemusí být dostupné"
|
||||
"entity_unavailable": "Entita {entity} není aktuálně k dispozici."
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
@@ -2351,8 +2281,6 @@
|
||||
"abort_intro": "Přihlášení bylo zrušeno",
|
||||
"authorizing_client": "Chystáte se dát {clientId} práva pro instanci Home Assistant.",
|
||||
"form": {
|
||||
"error": "Chyba: {error}",
|
||||
"next": "Další",
|
||||
"providers": {
|
||||
"command_line": {
|
||||
"abort": {
|
||||
@@ -2438,7 +2366,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"start_over": "Začít znovu",
|
||||
"unknown_error": "Něco se pokazilo",
|
||||
"working": "Počkejte prosím"
|
||||
},
|
||||
|
@@ -474,7 +474,6 @@
|
||||
},
|
||||
"common": {
|
||||
"and": "og",
|
||||
"back": "Tilbage",
|
||||
"cancel": "Annuller",
|
||||
"close": "Luk",
|
||||
"delete": "Slet",
|
||||
@@ -506,7 +505,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Ryd",
|
||||
"device": "Enhed",
|
||||
"no_area": "Intet område",
|
||||
"show_devices": "Vis enheder",
|
||||
"toggle": "Til/fra"
|
||||
},
|
||||
@@ -740,8 +738,6 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Forbindelse afbrudt. Opretter forbindelse igen...",
|
||||
"service_call_failed": "Kunne ikke kalde tjenesten {service}.",
|
||||
"started": "Home Assistant er startet!",
|
||||
"starting": "Home Assistant starter. Nogle funktioner er måske ikke tilgængelige før opstarten er færdig.",
|
||||
"triggered": "Udløste {name}"
|
||||
},
|
||||
"panel": {
|
||||
@@ -766,13 +762,9 @@
|
||||
},
|
||||
"description": "Oversigt over alle områder i dit hjem.",
|
||||
"editor": {
|
||||
"area_id": "Område-id",
|
||||
"create": "Opret",
|
||||
"default_name": "Nyt område",
|
||||
"delete": "Slet",
|
||||
"name": "Navn",
|
||||
"name_required": "Navn er påkrævet",
|
||||
"unknown_error": "Ukendt fejl",
|
||||
"update": "Opdater"
|
||||
},
|
||||
"picker": {
|
||||
@@ -807,7 +799,6 @@
|
||||
"label": "Forsinkelse"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Handling",
|
||||
"extra_fields": {
|
||||
"code": "Kode"
|
||||
},
|
||||
@@ -849,7 +840,6 @@
|
||||
"label": "Og"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Betingelse",
|
||||
"extra_fields": {
|
||||
"above": "Over",
|
||||
"below": "Under",
|
||||
@@ -928,8 +918,7 @@
|
||||
"below": "Under",
|
||||
"for": "Varighed"
|
||||
},
|
||||
"label": "Enhed",
|
||||
"trigger": "Udløser"
|
||||
"label": "Enhed"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Hændelsesdata",
|
||||
@@ -1257,7 +1246,6 @@
|
||||
"integration": "Integration",
|
||||
"manufacturer": "Producent",
|
||||
"model": "Model",
|
||||
"no_area": "Intet område",
|
||||
"no_devices": "Ingen enheder"
|
||||
},
|
||||
"delete": "Slet",
|
||||
@@ -2014,10 +2002,6 @@
|
||||
"add_item": "Tilføj element",
|
||||
"checked_items": "Markerede elementer",
|
||||
"clear_items": "Ryd markerede elementer"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant starter. Vent venligst.",
|
||||
"header": "Home Assistant starter..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2310,8 +2294,7 @@
|
||||
"attribute_not_found": "Egenskaben {attribute} er ikke tilgængelig i: {entity}",
|
||||
"entity_non_numeric": "Entitet er ikke-numerisk: {entity}",
|
||||
"entity_not_found": "Entitet ikke tilgængelig: {entity}",
|
||||
"entity_unavailable": "{entity} er ikke tilgængelig i øjeblikket",
|
||||
"starting": "Home Assistant starter. Nogle funktioner er måske ikke tilgængelige endnu."
|
||||
"entity_unavailable": "{entity} er ikke tilgængelig i øjeblikket"
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
|
@@ -474,7 +474,6 @@
|
||||
},
|
||||
"common": {
|
||||
"and": "und",
|
||||
"back": "Zurück",
|
||||
"cancel": "Abbrechen",
|
||||
"close": "Schließen",
|
||||
"delete": "Löschen",
|
||||
@@ -506,7 +505,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Löschen",
|
||||
"device": "Gerät",
|
||||
"no_area": "Kein Bereich",
|
||||
"show_devices": "Geräte anzeigen",
|
||||
"toggle": "Umschalten"
|
||||
},
|
||||
@@ -740,8 +738,6 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Verbindung getrennt. Verbinde erneut...",
|
||||
"service_call_failed": "Fehler beim Aufrufen des Service {service}.",
|
||||
"started": "Home Assistant ist gestartet!",
|
||||
"starting": "Home Assistant startet, es wird nicht alles verfügbar sein, bis es fertig ist.",
|
||||
"triggered": "{name} ausgelöst"
|
||||
},
|
||||
"panel": {
|
||||
@@ -766,13 +762,9 @@
|
||||
},
|
||||
"description": "Überblick über alle Bereiche in Deinem Haus.",
|
||||
"editor": {
|
||||
"area_id": "Bereich-ID",
|
||||
"create": "Erstellen",
|
||||
"default_name": "Neuer Bereich",
|
||||
"delete": "Löschen",
|
||||
"name": "Name",
|
||||
"name_required": "Name erforderlich",
|
||||
"unknown_error": "Unbekannter Fehler",
|
||||
"update": "Aktualisieren"
|
||||
},
|
||||
"picker": {
|
||||
@@ -807,7 +799,6 @@
|
||||
"label": "Verzögerung"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Aktion",
|
||||
"extra_fields": {
|
||||
"code": "Code"
|
||||
},
|
||||
@@ -849,7 +840,6 @@
|
||||
"label": "Und"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Bedingung",
|
||||
"extra_fields": {
|
||||
"above": "Über",
|
||||
"below": "Unter",
|
||||
@@ -928,8 +918,7 @@
|
||||
"below": "Unter",
|
||||
"for": "Dauer"
|
||||
},
|
||||
"label": "Gerät",
|
||||
"trigger": "Auslöser"
|
||||
"label": "Gerät"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Ereignisdaten",
|
||||
@@ -1257,7 +1246,6 @@
|
||||
"integration": "Integration",
|
||||
"manufacturer": "Hersteller",
|
||||
"model": "Modell",
|
||||
"no_area": "Kein Bereich",
|
||||
"no_devices": "keine Geräte"
|
||||
},
|
||||
"delete": "Löschen",
|
||||
@@ -1840,51 +1828,21 @@
|
||||
"set_wakeup": "Aufwachintervall einrichten",
|
||||
"true": "Richtig"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Zur Gruppe hinzufügen",
|
||||
"entities": "Entitäten dieses Knotens",
|
||||
"entity_info": "Entitätsinformationen",
|
||||
"exclude_entity": "Schließen Sie diese Entität vom Home Assistant aus",
|
||||
"group": "Gruppe",
|
||||
"header": "Z-Wave-Knotenverwaltung",
|
||||
"introduction": "Führen Sie Z-Wave-Befehle aus, die einen einzelnen Knoten betreffen. Wählen Sie einen Knoten aus, um eine Liste der verfügbaren Befehle anzuzeigen.",
|
||||
"max_associations": "Max Assoziationen:",
|
||||
"node_group_associations": "Knotengruppenzuordnungen",
|
||||
"node_protection": "Knotenschutz",
|
||||
"node_to_control": "Zu steuernder Knoten",
|
||||
"nodes": "Knoten",
|
||||
"nodes_hint": "Knoten auswählen, um Optionen pro Knoten anzuzeigen",
|
||||
"nodes_in_group": "Andere Knoten in dieser Gruppe:",
|
||||
"pooling_intensity": "Abfragehäufigkeit",
|
||||
"protection": "Schutz",
|
||||
"remove_broadcast": "Broadcast entfernen",
|
||||
"remove_from_group": "Aus der Gruppe entfernen",
|
||||
"set_protection": "Schutz einstellen"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "OZW Log",
|
||||
"introduction": "Schauen Sie das Protokoll an. 0 ist das Minimum (lädt das gesamte Protokoll) und 1000 ist das Maximum. Beim Laden wird ein statisches Protokoll angezeigt und das Ende wird automatisch mit der zuletzt angegebenen Anzahl von Zeilen des Protokolls aktualisiert.",
|
||||
"last_log_lines": "Anzahl der letzten Logzeilen"
|
||||
"introduction": "Schauen Sie das Protokoll an. 0 ist das Minimum (lädt das gesamte Protokoll) und 1000 ist das Maximum. Beim Laden wird ein statisches Protokoll angezeigt und das Ende wird automatisch mit der zuletzt angegebenen Anzahl von Zeilen des Protokolls aktualisiert."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Knoten hinzufügen",
|
||||
"add_node_secure": "Knoten verschlüsselt hinzufügen",
|
||||
"cancel_command": "Befehl abbrechen",
|
||||
"heal_network": "Netzwerk heilen",
|
||||
"heal_node": "Knoten heilen",
|
||||
"node_info": "Knoteninformationen",
|
||||
"print_node": "Knoten drucken",
|
||||
"refresh_entity": "Entität aktualisieren",
|
||||
"refresh_node": "Knoten aktualisieren",
|
||||
"remove_failed_node": "Fehlerhaften Knoten entfernen",
|
||||
"remove_node": "Knoten entfernen",
|
||||
"replace_failed_node": "Ausgefallenen Knoten ersetzen",
|
||||
"save_config": "Konfiguration speichern",
|
||||
"soft_reset": "Soft Reset",
|
||||
"start_network": "Netzwerk starten",
|
||||
"stop_network": "Netzwerk stoppen",
|
||||
"test_network": "Netzwerk testen",
|
||||
"test_node": "Testknoten"
|
||||
"test_network": "Netzwerk testen"
|
||||
},
|
||||
"values": {
|
||||
"header": "Knotenwerte"
|
||||
@@ -2043,10 +2001,6 @@
|
||||
"add_item": "Artikel hinzufügen",
|
||||
"checked_items": "Markierte Artikel",
|
||||
"clear_items": "Markierte Elemente löschen"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant startet, bitte warten Sie.",
|
||||
"header": "Home Assistant startet ..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2339,8 +2293,7 @@
|
||||
"attribute_not_found": "Attribut {attribute} nicht verfügbar in: {entity}",
|
||||
"entity_non_numeric": "Die Entität ist nicht-numerisch: {entity}",
|
||||
"entity_not_found": "Entität nicht verfügbar: {entity}",
|
||||
"entity_unavailable": "{entity} ist derzeit nicht verfügbar",
|
||||
"starting": "Home Assistant beginnt, vielleicht ist noch nicht alles verfügbar"
|
||||
"entity_unavailable": "{entity} ist derzeit nicht verfügbar"
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
|
@@ -478,7 +478,6 @@
|
||||
"cancel": "Cancel",
|
||||
"close": "Close",
|
||||
"delete": "Delete",
|
||||
"error_required": "Required",
|
||||
"loading": "Loading",
|
||||
"next": "Next",
|
||||
"no": "No",
|
||||
@@ -741,8 +740,6 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Connection lost. Reconnecting…",
|
||||
"service_call_failed": "Failed to call service {service}.",
|
||||
"started": "Home Assistant has started!",
|
||||
"starting": "Home Assistant is starting, not everything will be available until it is finished.",
|
||||
"triggered": "Triggered {name}"
|
||||
},
|
||||
"panel": {
|
||||
@@ -1222,7 +1219,6 @@
|
||||
"different_include": "Possibly via a domain, a glob or a different include.",
|
||||
"pick_attribute": "Pick an attribute to override",
|
||||
"picker": {
|
||||
"entity": "Entity",
|
||||
"header": "Customizations",
|
||||
"introduction": "Tweak per-entity attributes. Added/edited customizations will take effect immediately. Removed customizations will take effect when the entity is updated."
|
||||
},
|
||||
@@ -1681,8 +1677,7 @@
|
||||
"name": "Name",
|
||||
"system": "System"
|
||||
}
|
||||
},
|
||||
"users_privileges_note": "The users group is a work in progress. The user will be unable to administer the instance via the UI. We're still auditing all management API endpoints to ensure that they correctly limit access to administrators."
|
||||
}
|
||||
},
|
||||
"zha": {
|
||||
"add_device_page": {
|
||||
@@ -1844,53 +1839,21 @@
|
||||
"set_wakeup": "Set Wakeup Interval",
|
||||
"true": "True"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Add To Group",
|
||||
"entities": "Entities of this node",
|
||||
"entity_info": "Entity Information",
|
||||
"exclude_entity": "Exclude this entity from Home Assistant",
|
||||
"group": "Group",
|
||||
"header": "Z-Wave Node Management",
|
||||
"introduction": "Run Z-Wave commands that affect a single node. Pick a node to see a list of available commands.",
|
||||
"max_associations": "Max Associations:",
|
||||
"node_group_associations": "Node group associations",
|
||||
"node_protection": "Node protection",
|
||||
"node_to_control": "Node to control",
|
||||
"nodes": "Nodes",
|
||||
"nodes_hint": "Select node to view per-node options",
|
||||
"nodes_in_group": "Other Nodes in this group:",
|
||||
"pooling_intensity": "Polling intensity",
|
||||
"protection": "Protection",
|
||||
"remove_broadcast": "Remove Broadcast",
|
||||
"remove_from_group": "Remove From Group",
|
||||
"set_protection": "Set Protection"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "OZW Log",
|
||||
"introduction": "View the log. 0 is the minimum (loads entire log) and 1000 is the maximum. Load will show a static log and tail will auto update with the last specified number of lines of the log.",
|
||||
"last_log_lines": "Number of last log lines",
|
||||
"load": "Load",
|
||||
"tail": "Tail"
|
||||
"introduction": "View the log. 0 is the minimum (loads entire log) and 1000 is the maximum. Load will show a static log and tail will auto update with the last specified number of lines of the log."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Add Node",
|
||||
"add_node_secure": "Add Node Secure",
|
||||
"cancel_command": "Cancel Command",
|
||||
"heal_network": "Heal Network",
|
||||
"heal_node": "Heal Node",
|
||||
"node_info": "Node Information",
|
||||
"print_node": "Print Node",
|
||||
"refresh_entity": "Refresh Entity",
|
||||
"refresh_node": "Refresh Node",
|
||||
"remove_failed_node": "Remove Failed Node",
|
||||
"remove_node": "Remove Node",
|
||||
"replace_failed_node": "Replace Failed Node",
|
||||
"save_config": "Save Configuration",
|
||||
"soft_reset": "Soft Reset",
|
||||
"start_network": "Start Network",
|
||||
"stop_network": "Stop Network",
|
||||
"test_network": "Test Network",
|
||||
"test_node": "Test Node"
|
||||
"test_network": "Test Network"
|
||||
},
|
||||
"values": {
|
||||
"header": "Node Values"
|
||||
@@ -2049,10 +2012,6 @@
|
||||
"add_item": "Add item",
|
||||
"checked_items": "Checked items",
|
||||
"clear_items": "Clear checked items"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant is starting, please wait...",
|
||||
"header": "Home Assistant is starting..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2345,8 +2304,7 @@
|
||||
"attribute_not_found": "Attribute {attribute} not available in: {entity}",
|
||||
"entity_non_numeric": "Entity is non-numeric: {entity}",
|
||||
"entity_not_found": "Entity not available: {entity}",
|
||||
"entity_unavailable": "{entity} is currently unavailable",
|
||||
"starting": "Home Assistant is starting, not everything may be available yet"
|
||||
"entity_unavailable": "{entity} is currently unavailable"
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
|
@@ -474,7 +474,6 @@
|
||||
},
|
||||
"common": {
|
||||
"and": "y",
|
||||
"back": "Volver",
|
||||
"cancel": "Cancelar",
|
||||
"close": "Cerrar",
|
||||
"delete": "Eliminar",
|
||||
@@ -506,7 +505,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Limpiar",
|
||||
"device": "Dispositivo",
|
||||
"no_area": "Ningún área",
|
||||
"show_devices": "Mostrar dispositivos",
|
||||
"toggle": "Alternar"
|
||||
},
|
||||
@@ -740,8 +738,6 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Conexión perdida. Reconectando...",
|
||||
"service_call_failed": "Error al llamar al servicio {service}.",
|
||||
"started": "¡Home Assistant se ha iniciado!",
|
||||
"starting": "Home Assistant se está iniciando, no estará todo disponible hasta que finalice.",
|
||||
"triggered": "Activado {name}"
|
||||
},
|
||||
"panel": {
|
||||
@@ -766,13 +762,9 @@
|
||||
},
|
||||
"description": "Visión general de todas las áreas de tu casa.",
|
||||
"editor": {
|
||||
"area_id": "ID de área",
|
||||
"create": "Crear",
|
||||
"default_name": "Área Nueva",
|
||||
"delete": "Eliminar",
|
||||
"name": "Nombre",
|
||||
"name_required": "Se requiere el nombre",
|
||||
"unknown_error": "Error desconocido",
|
||||
"update": "Actualizar"
|
||||
},
|
||||
"picker": {
|
||||
@@ -807,7 +799,6 @@
|
||||
"label": "Retardo"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Acción",
|
||||
"extra_fields": {
|
||||
"code": "Código"
|
||||
},
|
||||
@@ -849,7 +840,6 @@
|
||||
"label": "Y"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Condición",
|
||||
"extra_fields": {
|
||||
"above": "Por encima de",
|
||||
"below": "Por debajo de",
|
||||
@@ -928,8 +918,7 @@
|
||||
"below": "Por debajo de",
|
||||
"for": "Duración"
|
||||
},
|
||||
"label": "Dispositivo",
|
||||
"trigger": "Desencadenante"
|
||||
"label": "Dispositivo"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Datos del evento",
|
||||
@@ -1257,7 +1246,6 @@
|
||||
"integration": "Integración",
|
||||
"manufacturer": "Fabricante",
|
||||
"model": "Modelo",
|
||||
"no_area": "Ningún área",
|
||||
"no_devices": "Sin dispositivos"
|
||||
},
|
||||
"delete": "Eliminar",
|
||||
@@ -1841,53 +1829,21 @@
|
||||
"set_wakeup": "Configurar el intervalo de activación",
|
||||
"true": "Verdadero"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Añadir al grupo",
|
||||
"entities": "Entidades de este nodo",
|
||||
"entity_info": "Información de la entidad",
|
||||
"exclude_entity": "Excluir esta entidad de Home Assistant",
|
||||
"group": "Grupo",
|
||||
"header": "Gestión de nodos Z-Wave",
|
||||
"introduction": "Ejecuta comandos de Z-Wave que afectan a un solo nodo. Elije un nodo para ver una lista de comandos disponibles.",
|
||||
"max_associations": "Asociaciones máximas:",
|
||||
"node_group_associations": "Asociaciones de grupos de nodos",
|
||||
"node_protection": "Protección del nodo",
|
||||
"node_to_control": "Nodo a controlar",
|
||||
"nodes": "Nodos",
|
||||
"nodes_hint": "Selecciona un nodo para ver las opciones por nodo",
|
||||
"nodes_in_group": "Otros nodos en este grupo:",
|
||||
"pooling_intensity": "Intensidad de sondeo",
|
||||
"protection": "Protección",
|
||||
"remove_broadcast": "Eliminar difusión",
|
||||
"remove_from_group": "Eliminar del grupo",
|
||||
"set_protection": "Establecer protección"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "OZW Log",
|
||||
"introduction": "Ver el registro. 0 es el mínimo (carga el registro completo) y 1000 es el máximo. Load mostrará un registro estático y tail se actualizará automáticamente con el último número especificado de líneas del registro.",
|
||||
"last_log_lines": "Número de últimas líneas de registro",
|
||||
"load": "Cargar",
|
||||
"tail": "Cola"
|
||||
"introduction": "Ver el registro. 0 es el mínimo (carga el registro completo) y 1000 es el máximo. Load mostrará un registro estático y tail se actualizará automáticamente con el último número especificado de líneas del registro."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Añadir nodo",
|
||||
"add_node_secure": "Añadir nodo seguro",
|
||||
"cancel_command": "Cancelar comando",
|
||||
"heal_network": "Sanar red",
|
||||
"heal_node": "Sanar nodo",
|
||||
"node_info": "Información del nodo",
|
||||
"print_node": "Imprimir nodo",
|
||||
"refresh_entity": "Actualizar Entidad",
|
||||
"refresh_node": "Actualizar nodo",
|
||||
"remove_failed_node": "Eliminar nodo fallido",
|
||||
"remove_node": "Eliminar nodo",
|
||||
"replace_failed_node": "Reemplazar nodo fallido",
|
||||
"save_config": "Guardar configuración",
|
||||
"soft_reset": "Reinicio suave",
|
||||
"start_network": "Iniciar red",
|
||||
"stop_network": "Detener red",
|
||||
"test_network": "Probar red",
|
||||
"test_node": "Comprobar nodo"
|
||||
"test_network": "Probar red"
|
||||
},
|
||||
"values": {
|
||||
"header": "Valores del nodo"
|
||||
@@ -2046,10 +2002,6 @@
|
||||
"add_item": "Añadir artículo",
|
||||
"checked_items": "Elementos marcados",
|
||||
"clear_items": "Borrar elementos marcados"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant se está iniciando, espera por favor.",
|
||||
"header": "Home Assistant se está iniciando..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2342,8 +2294,7 @@
|
||||
"attribute_not_found": "El atributo {attribute} no está disponible en: {entity}",
|
||||
"entity_non_numeric": "La entidad no es numérica: {entity}",
|
||||
"entity_not_found": "La entidad no está disponible: {entity}",
|
||||
"entity_unavailable": "{entity} no está disponible actualmente",
|
||||
"starting": "Home Assistant se está iniciando, puede que no todo esté disponible todavía"
|
||||
"entity_unavailable": "{entity} no está disponible actualmente"
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
|
@@ -474,7 +474,6 @@
|
||||
},
|
||||
"common": {
|
||||
"and": "ja",
|
||||
"back": "Takaisin",
|
||||
"cancel": "Peruuta",
|
||||
"close": "Sulje",
|
||||
"delete": "Poista",
|
||||
@@ -506,7 +505,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Tyhjennä",
|
||||
"device": "Laite",
|
||||
"no_area": "Ei aluetta",
|
||||
"show_devices": "Näytä laitteet",
|
||||
"toggle": "Vaihda"
|
||||
},
|
||||
@@ -764,13 +762,9 @@
|
||||
},
|
||||
"description": "Yleiskuva kaikista kotisi alueista.",
|
||||
"editor": {
|
||||
"area_id": "Alueen tunnus",
|
||||
"create": "Luo",
|
||||
"default_name": "Uusi alue",
|
||||
"delete": "Poista",
|
||||
"name": "Nimi",
|
||||
"name_required": "Nimi on pakollinen",
|
||||
"unknown_error": "Tuntematon virhe",
|
||||
"update": "Päivitä"
|
||||
},
|
||||
"picker": {
|
||||
@@ -805,7 +799,6 @@
|
||||
"label": "Viive"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Toiminta",
|
||||
"extra_fields": {
|
||||
"code": "Koodi"
|
||||
},
|
||||
@@ -847,7 +840,6 @@
|
||||
"label": "Ja"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Ehto",
|
||||
"extra_fields": {
|
||||
"above": "Yli",
|
||||
"below": "Alle",
|
||||
@@ -926,8 +918,7 @@
|
||||
"below": "Alle",
|
||||
"for": "Kesto"
|
||||
},
|
||||
"label": "Laite",
|
||||
"trigger": "Laukaisin"
|
||||
"label": "Laite"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Tapahtuman tietosisältö",
|
||||
@@ -1255,7 +1246,6 @@
|
||||
"integration": "Integraatio",
|
||||
"manufacturer": "Valmistaja",
|
||||
"model": "Malli",
|
||||
"no_area": "Ei aluetta",
|
||||
"no_devices": "Ei laitteita"
|
||||
},
|
||||
"delete": "Poista",
|
||||
@@ -1839,48 +1829,21 @@
|
||||
"set_wakeup": "Aseta herätysväli",
|
||||
"true": "Tosi"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Lisää ryhmään",
|
||||
"entities": "Tämän solmun kohteet",
|
||||
"entity_info": "Kohteen tiedot",
|
||||
"exclude_entity": "Jätä tämä kohde pois Home Assistantista",
|
||||
"group": "Ryhmä",
|
||||
"header": "Z-Wave-solmun hallinta",
|
||||
"introduction": "Suorita Z-Wave-komennot, jotka vaikuttavat yhteen solmuun. Valitse solmu nähdäksesi luettelon käytettävissä olevista komennoista.",
|
||||
"node_protection": "Solmujen suojaus",
|
||||
"node_to_control": "Hallinnoitava solmu",
|
||||
"nodes": "Solmut",
|
||||
"nodes_hint": "Valitse solmu tarkastellaksesi solmukohtaisia vaihtoehtoja",
|
||||
"pooling_intensity": "Kyselyn voimakkuus",
|
||||
"protection": "Suojaus",
|
||||
"remove_broadcast": "Poista lähetys",
|
||||
"remove_from_group": "Poista ryhmästä",
|
||||
"set_protection": "Aseta suojaus"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "OZW-loki",
|
||||
"introduction": "Tarkastele lokia. 0 on pienin (lataa koko lokin) ja 1000 on maksimi. Lataus näyttää staattisen lokin ja päivittää automaattisesti viimeisen määritetyn määrän rivejä lokiin.",
|
||||
"last_log_lines": "Viimeisten lokirivien määrä",
|
||||
"load": "Lataa",
|
||||
"tail": "Häntä"
|
||||
"introduction": "Tarkastele lokia. 0 on pienin (lataa koko lokin) ja 1000 on maksimi. Lataus näyttää staattisen lokin ja päivittää automaattisesti viimeisen määritetyn määrän rivejä lokiin."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Lisää solmu",
|
||||
"add_node_secure": "Lisää suojattu solmu",
|
||||
"cancel_command": "Peruuta komento",
|
||||
"heal_network": "Paranna verkko",
|
||||
"heal_node": "Paranna solmu",
|
||||
"node_info": "Solmun tiedot",
|
||||
"print_node": "Tulosta solmu",
|
||||
"refresh_entity": "Päivitä kohde",
|
||||
"refresh_node": "Päivitä solmu",
|
||||
"remove_node": "Poista solmu",
|
||||
"save_config": "Tallenna asetukset",
|
||||
"soft_reset": "Pehmeä nollaus",
|
||||
"start_network": "Käynnistä verkko",
|
||||
"stop_network": "Pysäytä verkko",
|
||||
"test_network": "Testaa verkkoyhteys",
|
||||
"test_node": "Testaa solmu"
|
||||
"test_network": "Testaa verkkoyhteys"
|
||||
},
|
||||
"values": {
|
||||
"header": "Solmujen arvot"
|
||||
@@ -2324,7 +2287,7 @@
|
||||
"views": {
|
||||
"confirm_delete": "Oletko varma, että haluat poistaa tämän näkymän?",
|
||||
"confirm_delete_existing_cards": "Tämän näkymän poistaminen poistaa myös kortit",
|
||||
"confirm_delete_existing_cards_text": "Haluatko varmasti poistaa näkymän {name}? Näkymä sisältää {number} korttia, jotka poistetaan. Tätä toimintoa ei voi kumota.",
|
||||
"confirm_delete_existing_cards_text": "Haluatko varmasti poistaa näkymän {name}? Näkymä sisältää {number}-kortteja, jotka poistetaan. Tätä toimintoa ei voi kumota.",
|
||||
"confirm_delete_text": "Haluatko varmasti poistaa ''{name}'' -näkymäsi?"
|
||||
},
|
||||
"warning": {
|
||||
@@ -2344,8 +2307,6 @@
|
||||
"abort_intro": "Kirjautuminen on keskeytetty",
|
||||
"authorizing_client": "Olet antamassa pääsyn {clientId} Home Assistant -ympäristöösi.",
|
||||
"form": {
|
||||
"error": "Virhe: {error}",
|
||||
"next": "Seuraava",
|
||||
"providers": {
|
||||
"command_line": {
|
||||
"abort": {
|
||||
@@ -2431,7 +2392,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"start_over": "Aloita alusta",
|
||||
"unknown_error": "Jotain meni pieleen",
|
||||
"working": "Ole hyvä ja odota"
|
||||
},
|
||||
|
@@ -474,7 +474,6 @@
|
||||
},
|
||||
"common": {
|
||||
"and": "et",
|
||||
"back": "Retour",
|
||||
"cancel": "Annuler",
|
||||
"close": "Fermer",
|
||||
"delete": "Supprimer",
|
||||
@@ -506,7 +505,6 @@
|
||||
"device-picker": {
|
||||
"clear": "Effacer",
|
||||
"device": "Appareil",
|
||||
"no_area": "Pas de zone",
|
||||
"show_devices": "Afficher les appareils",
|
||||
"toggle": "Permuter"
|
||||
},
|
||||
@@ -740,8 +738,6 @@
|
||||
"notification_toast": {
|
||||
"connection_lost": "Connexion perdue. Reconnexion en cours ...",
|
||||
"service_call_failed": "Échec d'appel du service \"{service}\".",
|
||||
"started": "Home Assistant a démarré !",
|
||||
"starting": "Home Assistant démarre, tout ne sera pas disponible jusqu'à ce qu'il soit terminé.",
|
||||
"triggered": "{name} déclenché"
|
||||
},
|
||||
"panel": {
|
||||
@@ -766,13 +762,9 @@
|
||||
},
|
||||
"description": "Vue d'ensemble de toutes les pièces de votre maison.",
|
||||
"editor": {
|
||||
"area_id": "ID de la zone",
|
||||
"create": "Créer",
|
||||
"default_name": "Nouvelle Pièce",
|
||||
"delete": "Supprimer",
|
||||
"name": "Nom",
|
||||
"name_required": "Le nom est requis",
|
||||
"unknown_error": "Erreur inconnue",
|
||||
"update": "Mise à jour"
|
||||
},
|
||||
"picker": {
|
||||
@@ -807,7 +799,6 @@
|
||||
"label": "Délai"
|
||||
},
|
||||
"device_id": {
|
||||
"action": "Action",
|
||||
"extra_fields": {
|
||||
"code": "Code"
|
||||
},
|
||||
@@ -849,7 +840,6 @@
|
||||
"label": "Et"
|
||||
},
|
||||
"device": {
|
||||
"condition": "Condition",
|
||||
"extra_fields": {
|
||||
"above": "Au-dessus de",
|
||||
"below": "Au-dessous de",
|
||||
@@ -928,8 +918,7 @@
|
||||
"below": "En dessous de",
|
||||
"for": "Durée"
|
||||
},
|
||||
"label": "Équipements",
|
||||
"trigger": "Déclencheur"
|
||||
"label": "Équipements"
|
||||
},
|
||||
"event": {
|
||||
"event_data": "Données de l'événement",
|
||||
@@ -1257,7 +1246,6 @@
|
||||
"integration": "Intégration",
|
||||
"manufacturer": "Fabricant",
|
||||
"model": "Modèle",
|
||||
"no_area": "Pas de zone",
|
||||
"no_devices": "Aucun appareil"
|
||||
},
|
||||
"delete": "Supprimer",
|
||||
@@ -1841,43 +1829,21 @@
|
||||
"set_wakeup": "Définir l'intervalle de réveil",
|
||||
"true": "Vrai"
|
||||
},
|
||||
"node_management": {
|
||||
"add_to_group": "Ajouter au groupe",
|
||||
"group": "Groupe",
|
||||
"header": "Gestion des nœuds Z-Wave",
|
||||
"max_associations": "Associations Max:",
|
||||
"node_protection": "Protection des nœuds",
|
||||
"node_to_control": "Noeud à contrôler",
|
||||
"nodes": "Noeuds",
|
||||
"nodes_in_group": "Autres nœuds de ce groupe :",
|
||||
"protection": "Protection",
|
||||
"remove_broadcast": "Supprimer la diffusion",
|
||||
"remove_from_group": "Supprimer du groupe",
|
||||
"set_protection": "Définir la protection"
|
||||
},
|
||||
"ozw_log": {
|
||||
"header": "Journal OZW",
|
||||
"introduction": "Afficher le journal. Entrer un nombre de 1 à 1000 lignes pour limiter le nombre de lignes chargées dans le journal, ou entrer 0 pour désactiver la limitation du nombre de lignes affichées (journal complet). \"Load\" affichera un instantané du journal, alors que \"Tail\" affichera le journal en l'actualisant au fur et à mesure que de nouvelles entrées apparaissent.",
|
||||
"tail": "Queue"
|
||||
"introduction": "Afficher le journal. Entrer un nombre de 1 à 1000 lignes pour limiter le nombre de lignes chargées dans le journal, ou entrer 0 pour désactiver la limitation du nombre de lignes affichées (journal complet). \"Load\" affichera un instantané du journal, alors que \"Tail\" affichera le journal en l'actualisant au fur et à mesure que de nouvelles entrées apparaissent."
|
||||
},
|
||||
"services": {
|
||||
"add_node": "Ajouter un nœud",
|
||||
"add_node_secure": "Ajouter un nœud sécurisé",
|
||||
"cancel_command": "Annuler la commande",
|
||||
"heal_network": "Soigner le réseau",
|
||||
"heal_node": "Guérir Nœud",
|
||||
"node_info": "Informations sur le nœud",
|
||||
"refresh_entity": "Actualiser l'entité",
|
||||
"refresh_node": "Actualiser Nœud",
|
||||
"remove_failed_node": "Supprimer le nœud défaillant",
|
||||
"remove_node": "Supprimer un nœud",
|
||||
"replace_failed_node": "Remplacer le nœud défaillant",
|
||||
"save_config": "Enregistrer la configuration",
|
||||
"soft_reset": "Redémarrage",
|
||||
"start_network": "Démarrer le réseau",
|
||||
"stop_network": "Arrêter le réseau",
|
||||
"test_network": "Tester le réseau",
|
||||
"test_node": "Tester Nœud"
|
||||
"test_network": "Tester le réseau"
|
||||
},
|
||||
"values": {
|
||||
"header": "Valeurs des nœuds"
|
||||
@@ -2036,10 +2002,6 @@
|
||||
"add_item": "Ajouter un élément",
|
||||
"checked_items": "Éléments cochés",
|
||||
"clear_items": "Effacer les éléments cochés"
|
||||
},
|
||||
"starting": {
|
||||
"description": "Home Assistant démarre, veuillez patienter.",
|
||||
"header": "Home Assistant démarre ..."
|
||||
}
|
||||
},
|
||||
"changed_toast": {
|
||||
@@ -2332,8 +2294,7 @@
|
||||
"attribute_not_found": "Attribut {attribute} non disponible dans: {entity}",
|
||||
"entity_non_numeric": "L'entité est non numérique: {entity}",
|
||||
"entity_not_found": "Entité non disponible: {entity}",
|
||||
"entity_unavailable": "{entity} n'est pas disponible actuellement",
|
||||
"starting": "Home Assistant démarre, tout n'est peut-être pas encore disponible"
|
||||
"entity_unavailable": "{entity} n'est pas disponible actuellement"
|
||||
}
|
||||
},
|
||||
"mailbox": {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user