Merge pull request #9045 from home-assistant/dev

This commit is contained in:
Bram Kragten 2021-04-29 22:21:03 +02:00 committed by GitHub
commit 764ae7e0b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 539 additions and 160 deletions

View File

@ -15,6 +15,10 @@ class DemoCard extends PolymerElement {
margin: 0 0 20px; margin: 0 0 20px;
color: var(--primary-color); color: var(--primary-color);
} }
h2 small {
font-size: 0.5em;
color: var(--primary-text-color);
}
#card { #card {
max-width: 400px; max-width: 400px;
width: 100vw; width: 100vw;
@ -34,7 +38,12 @@ class DemoCard extends PolymerElement {
} }
} }
</style> </style>
<h2>[[config.heading]]</h2> <h2>
[[config.heading]]
<template is="dom-if" if="[[_size]]">
<small>(size [[_size]])</small>
</template>
</h2>
<div class="root"> <div class="root">
<div id="card"></div> <div id="card"></div>
<template is="dom-if" if="[[showConfig]]"> <template is="dom-if" if="[[showConfig]]">
@ -55,6 +64,9 @@ class DemoCard extends PolymerElement {
observer: "_configChanged", observer: "_configChanged",
}, },
showConfig: Boolean, showConfig: Boolean,
_size: {
type: Number,
},
}; };
} }
@ -70,6 +82,17 @@ class DemoCard extends PolymerElement {
const el = this._createCardElement(safeLoad(config.config)[0]); const el = this._createCardElement(safeLoad(config.config)[0]);
card.appendChild(el); card.appendChild(el);
this._getSize(el);
}
async _getSize(el) {
await customElements.whenDefined(el.localName);
if (!("getCardSize" in el)) {
this._size = undefined;
return;
}
this._size = await el.getCardSize();
} }
_createCardElement(cardConfig) { _createCardElement(cardConfig) {

View File

@ -49,6 +49,100 @@ const ENTITIES = [
]; ];
const CONFIGS = [ const CONFIGS = [
{
heading: "Default Grid",
config: `
- type: grid
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
- type: entity
entity: device_tracker.demo_paulus
- type: sensor
entity: sensor.illumination
graph: line
- type: entity
entity: device_tracker.demo_anne_therese
`,
},
{
heading: "Non-square Grid with 2 columns",
config: `
- type: grid
columns: 2
square: false
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
- type: entity
entity: device_tracker.demo_paulus
- type: sensor
entity: sensor.illumination
graph: line
`,
},
{
heading: "Default Grid with title",
config: `
- type: grid
title: Kitchen
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
- type: entity
entity: device_tracker.demo_paulus
- type: sensor
entity: sensor.illumination
graph: line
- type: entity
entity: device_tracker.demo_anne_therese
`,
},
{
heading: "Columns 4",
config: `
- type: grid
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
- type: entity
entity: device_tracker.demo_paulus
- type: sensor
entity: sensor.illumination
graph: line
`,
},
{
heading: "Columns 2",
config: `
- type: grid
columns: 2
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
`,
},
{
heading: "Columns 1",
config: `
- type: grid
columns: 1
cards:
- type: entity
entity: light.kitchen_lights
`,
},
{ {
heading: "Vertical Stack", heading: "Vertical Stack",
config: ` config: `
@ -99,45 +193,9 @@ const CONFIGS = [
entity: light.bed_light entity: light.bed_light
`, `,
}, },
{
heading: "Default Grid",
config: `
- type: grid
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
- type: entity
entity: device_tracker.demo_paulus
- type: sensor
entity: sensor.illumination
graph: line
- type: entity
entity: device_tracker.demo_anne_therese
`,
},
{
heading: "Non-square Grid with 2 columns",
config: `
- type: grid
columns: 2
square: false
cards:
- type: entity
entity: light.kitchen_lights
- type: entity
entity: light.bed_light
- type: entity
entity: device_tracker.demo_paulus
- type: sensor
entity: sensor.illumination
graph: line
`,
},
]; ];
@customElement("demo-hui-stack-card") @customElement("demo-hui-grid-and-stack-card")
class DemoStack extends LitElement { class DemoStack extends LitElement {
@query("#demos") private _demoRoot!: HTMLElement; @query("#demos") private _demoRoot!: HTMLElement;
@ -155,4 +213,8 @@ class DemoStack extends LitElement {
} }
} }
customElements.define("demo-hui-stack-card", DemoStack); declare global {
interface HTMLElementTagNameMap {
"demo-hui-grid-and-stack-card": DemoStack;
}
}

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name="home-assistant-frontend", name="home-assistant-frontend",
version="20210428.0", version="20210429.0",
description="The Home Assistant frontend", description="The Home Assistant frontend",
url="https://github.com/home-assistant/home-assistant-polymer", url="https://github.com/home-assistant/home-assistant-polymer",
author="The Home Assistant Authors", author="The Home Assistant Authors",

View File

@ -15,7 +15,6 @@ import { computeActiveState } from "../../common/entity/compute_active_state";
import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { computeStateDomain } from "../../common/entity/compute_state_domain";
import { stateIcon } from "../../common/entity/state_icon"; import { stateIcon } from "../../common/entity/state_icon";
import { iconColorCSS } from "../../common/style/icon_color_css"; import { iconColorCSS } from "../../common/style/icon_color_css";
import { getLightRgbColor, LightEntity } from "../../data/light";
import type { HomeAssistant } from "../../types"; import type { HomeAssistant } from "../../types";
import "../ha-icon"; import "../ha-icon";
@ -100,14 +99,8 @@ export class StateBadge extends LitElement {
hostStyle.backgroundImage = `url(${imageUrl})`; hostStyle.backgroundImage = `url(${imageUrl})`;
this._showIcon = false; this._showIcon = false;
} else if (stateObj.state === "on") { } else if (stateObj.state === "on") {
if ( if (this.stateColor !== false && stateObj.attributes.rgb_color) {
computeStateDomain(stateObj) === "light" && iconStyle.color = `rgb(${stateObj.attributes.rgb_color.join(",")})`;
this.stateColor !== false
) {
const rgb = getLightRgbColor(stateObj as LightEntity);
if (rgb) {
iconStyle.color = `rgb(${rgb.slice(0, 3).join(",")})`;
}
} }
if (stateObj.attributes.brightness && this.stateColor !== false) { if (stateObj.attributes.brightness && this.stateColor !== false) {
const brightness = stateObj.attributes.brightness; const brightness = stateObj.attributes.brightness;

View File

@ -143,7 +143,7 @@ class HatScriptGraph extends LitElement {
const trace = this.trace.trace[path] as ChooseActionTraceStep[] | undefined; const trace = this.trace.trace[path] as ChooseActionTraceStep[] | undefined;
const trace_path = trace?.[0].result const trace_path = trace?.[0].result
? trace[0].result.choice === "default" ? trace[0].result.choice === "default"
? [config.choose?.length || 0] ? [Array.isArray(config.choose) ? config.choose.length : 0]
: [trace[0].result.choice] : [trace[0].result.choice]
: []; : [];
return html` return html`
@ -167,31 +167,33 @@ class HatScriptGraph extends LitElement {
nofocus nofocus
></hat-graph-node> ></hat-graph-node>
${config.choose?.map((branch, i) => { ${config.choose
const branch_path = `${path}/choose/${i}`; ? ensureArray(config.choose)?.map((branch, i) => {
const track_this = const branch_path = `${path}/choose/${i}`;
trace !== undefined && trace[0].result?.choice === i; const track_this =
if (track_this) { trace !== undefined && trace[0].result?.choice === i;
this.trackedNodes[branch_path] = { config, path: branch_path }; if (track_this) {
} this.trackedNodes[branch_path] = { config, path: branch_path };
return html` }
<hat-graph> return html`
<hat-graph-node <hat-graph>
.iconPath=${!trace || track_this <hat-graph-node
? mdiCheckBoxOutline .iconPath=${!trace || track_this
: mdiCheckboxBlankOutline} ? mdiCheckBoxOutline
@focus=${this.selectNode(config, branch_path)} : mdiCheckboxBlankOutline}
class=${classMap({ @focus=${this.selectNode(config, branch_path)}
active: this.selected === branch_path, class=${classMap({
track: track_this, active: this.selected === branch_path,
})} track: track_this,
></hat-graph-node> })}
${ensureArray(branch.sequence).map((action, j) => ></hat-graph-node>
this.render_node(action, `${branch_path}/sequence/${j}`) ${ensureArray(branch.sequence).map((action, j) =>
)} this.render_node(action, `${branch_path}/sequence/${j}`)
</hat-graph> )}
`; </hat-graph>
})} `;
})
: ""}
<hat-graph> <hat-graph>
<hat-graph-spacer <hat-graph-spacer
class=${classMap({ class=${classMap({

View File

@ -56,7 +56,9 @@ export const lightSupportsDimming = (entity: LightEntity) => {
); );
}; };
export const getLightRgbColor = (entity: LightEntity): number[] | undefined => export const getLightCurrentModeRgbColor = (
entity: LightEntity
): number[] | undefined =>
entity.attributes.color_mode === LightColorModes.RGBWW entity.attributes.color_mode === LightColorModes.RGBWW
? entity.attributes.rgbww_color ? entity.attributes.rgbww_color
: entity.attributes.color_mode === LightColorModes.RGBW : entity.attributes.color_mode === LightColorModes.RGBW

View File

@ -112,7 +112,7 @@ export interface ChooseActionChoice {
export interface ChooseAction { export interface ChooseAction {
alias?: string; alias?: string;
choose: ChooseActionChoice[] | null; choose: ChooseActionChoice | ChooseActionChoice[] | null;
default?: Action | Action[]; default?: Action | Action[];
} }

View File

@ -18,7 +18,7 @@ import "../../../components/ha-icon-button";
import "../../../components/ha-labeled-slider"; import "../../../components/ha-labeled-slider";
import "../../../components/ha-paper-dropdown-menu"; import "../../../components/ha-paper-dropdown-menu";
import { import {
getLightRgbColor, getLightCurrentModeRgbColor,
LightColorModes, LightColorModes,
LightEntity, LightEntity,
lightIsInColorMode, lightIsInColorMode,
@ -34,6 +34,7 @@ const toggleButtons = [
{ label: "Color", value: "color" }, { label: "Color", value: "color" },
{ label: "Temperature", value: LightColorModes.COLOR_TEMP }, { label: "Temperature", value: LightColorModes.COLOR_TEMP },
]; ];
@customElement("more-info-light") @customElement("more-info-light")
class MoreInfoLight extends LitElement { class MoreInfoLight extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant; @property({ attribute: false }) public hass!: HomeAssistant;
@ -155,7 +156,7 @@ class MoreInfoLight extends LitElement {
)} )}
icon="hass:brightness-7" icon="hass:brightness-7"
max="100" max="100"
.value=${this._colorBrightnessSliderValue ?? 255} .value=${this._colorBrightnessSliderValue ?? 100}
@change=${this._colorBrightnessSliderChanged} @change=${this._colorBrightnessSliderChanged}
pin pin
></ha-labeled-slider>` ></ha-labeled-slider>`
@ -302,9 +303,10 @@ class MoreInfoLight extends LitElement {
) )
: undefined; : undefined;
this._colorPickerColor = getLightRgbColor(stateObj)?.slice(0, 3) as this._colorPickerColor = getLightCurrentModeRgbColor(stateObj)?.slice(
| [number, number, number] 0,
| undefined; 3
) as [number, number, number] | undefined;
} else { } else {
this._brightnessSliderValue = 0; this._brightnessSliderValue = 0;
} }
@ -379,9 +381,9 @@ class MoreInfoLight extends LitElement {
return; return;
} }
wv = (wv * 255) / 100; wv = Math.min(255, Math.round((wv * 255) / 100));
const rgb = getLightRgbColor(this.stateObj!); const rgb = getLightCurrentModeRgbColor(this.stateObj!);
if (name === "wv") { if (name === "wv") {
const rgbw_color = rgb || [0, 0, 0, 0]; const rgbw_color = rgb || [0, 0, 0, 0];
@ -406,9 +408,15 @@ class MoreInfoLight extends LitElement {
private _colorBrightnessSliderChanged(ev: CustomEvent) { private _colorBrightnessSliderChanged(ev: CustomEvent) {
const target = ev.target as any; const target = ev.target as any;
const value = Number(target.value); let value = Number(target.value);
const rgb = (getLightRgbColor(this.stateObj!)?.slice(0, 3) || [ if (isNaN(value)) {
return;
}
value = (value * 255) / 100;
const rgb = (getLightCurrentModeRgbColor(this.stateObj!)?.slice(0, 3) || [
255, 255,
255, 255,
255, 255,
@ -420,7 +428,7 @@ class MoreInfoLight extends LitElement {
this._colorBrightnessSliderValue this._colorBrightnessSliderValue
? this._adjustColorBrightness( ? this._adjustColorBrightness(
rgb, rgb,
this._colorBrightnessSliderValue, (this._colorBrightnessSliderValue * 255) / 100,
true true
) )
: rgb, : rgb,
@ -449,9 +457,9 @@ class MoreInfoLight extends LitElement {
if (invert) { if (invert) {
ratio = 1 / ratio; ratio = 1 / ratio;
} }
rgbColor[0] *= ratio; rgbColor[0] = Math.min(255, Math.round(rgbColor[0] * ratio));
rgbColor[1] *= ratio; rgbColor[1] = Math.min(255, Math.round(rgbColor[1] * ratio));
rgbColor[2] *= ratio; rgbColor[2] = Math.min(255, Math.round(rgbColor[2] * ratio));
} }
return rgbColor; return rgbColor;
} }
@ -491,7 +499,7 @@ class MoreInfoLight extends LitElement {
this._colorBrightnessSliderValue this._colorBrightnessSliderValue
? this._adjustColorBrightness( ? this._adjustColorBrightness(
[ev.detail.rgb.r, ev.detail.rgb.g, ev.detail.rgb.b], [ev.detail.rgb.r, ev.detail.rgb.g, ev.detail.rgb.b],
this._colorBrightnessSliderValue (this._colorBrightnessSliderValue * 255) / 100
) )
: [ev.detail.rgb.r, ev.detail.rgb.g, ev.detail.rgb.b] : [ev.detail.rgb.r, ev.detail.rgb.g, ev.detail.rgb.b]
); );

View File

@ -2,7 +2,11 @@
<html> <html>
<head> <head>
<title>Home Assistant</title> <title>Home Assistant</title>
<link rel="modulepreload" href="<%= latestPageJS %>" crossorigin="use-credentials" /> <link
rel="modulepreload"
href="<%= latestPageJS %>"
crossorigin="use-credentials"
/>
<%= renderTemplate('_header') %> <%= renderTemplate('_header') %>
<style> <style>
html { html {
@ -15,8 +19,19 @@
border-radius: 4px; border-radius: 4px;
max-width: 432px; max-width: 432px;
margin: 64px auto 0; margin: 64px auto 0;
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px; box-shadow: var(
background-color: #fff; --ha-card-box-shadow,
rgba(0, 0, 0, 0.25) 0px 54px 55px,
rgba(0, 0, 0, 0.12) 0px -12px 30px,
rgba(0, 0, 0, 0.12) 0px 4px 6px,
rgba(0, 0, 0, 0.17) 0px 12px 13px,
rgba(0, 0, 0, 0.09) 0px -3px 5px
);
background: var(
--ha-card-background,
var(--card-background-color, white)
);
color: var(--primary-text-color, #212121);
} }
.header { .header {
@ -34,7 +49,6 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html { html {
background-color: #111111;
color: #e1e1e1; color: #e1e1e1;
} }
} }
@ -45,10 +59,9 @@
margin: 0; margin: 0;
} }
} }
</style> </style>
</head> </head>
<body id='particles'> <body id="particles">
<div class="content"> <div class="content">
<div class="header"> <div class="header">
<img src="/static/icons/favicon-192x192.png" height="52" width="52" /> <img src="/static/icons/favicon-192x192.png" height="52" width="52" />

View File

@ -10,6 +10,7 @@ import {
} from "lit-element"; } from "lit-element";
import { html } from "lit-html"; import { html } from "lit-html";
import { fireEvent } from "../../../../../common/dom/fire_event"; import { fireEvent } from "../../../../../common/dom/fire_event";
import { ensureArray } from "../../../../../common/ensure-array";
import { Condition } from "../../../../../data/automation"; import { Condition } from "../../../../../data/automation";
import { Action, ChooseAction } from "../../../../../data/script"; import { Action, ChooseAction } from "../../../../../data/script";
import { haStyle } from "../../../../../resources/styles"; import { haStyle } from "../../../../../resources/styles";
@ -31,7 +32,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
const action = this.action; const action = this.action;
return html` return html`
${(action.choose || []).map( ${(action.choose ? ensureArray(action.choose) : []).map(
(option, idx) => html`<ha-card> (option, idx) => html`<ha-card>
<mwc-icon-button <mwc-icon-button
.idx=${idx} .idx=${idx}
@ -101,7 +102,9 @@ export class HaChooseAction extends LitElement implements ActionElement {
ev.stopPropagation(); ev.stopPropagation();
const value = ev.detail.value as Condition[]; const value = ev.detail.value as Condition[];
const index = (ev.target as any).idx; const index = (ev.target as any).idx;
const choose = this.action.choose ? [...this.action.choose] : []; const choose = this.action.choose
? [...ensureArray(this.action.choose)]
: [];
choose[index].conditions = value; choose[index].conditions = value;
fireEvent(this, "value-changed", { fireEvent(this, "value-changed", {
value: { ...this.action, choose }, value: { ...this.action, choose },
@ -112,7 +115,9 @@ export class HaChooseAction extends LitElement implements ActionElement {
ev.stopPropagation(); ev.stopPropagation();
const value = ev.detail.value as Action[]; const value = ev.detail.value as Action[];
const index = (ev.target as any).idx; const index = (ev.target as any).idx;
const choose = this.action.choose ? [...this.action.choose] : []; const choose = this.action.choose
? [...ensureArray(this.action.choose)]
: [];
choose[index].sequence = value; choose[index].sequence = value;
fireEvent(this, "value-changed", { fireEvent(this, "value-changed", {
value: { ...this.action, choose }, value: { ...this.action, choose },
@ -120,7 +125,9 @@ export class HaChooseAction extends LitElement implements ActionElement {
} }
private _addOption() { private _addOption() {
const choose = this.action.choose ? [...this.action.choose] : []; const choose = this.action.choose
? [...ensureArray(this.action.choose)]
: [];
choose.push({ conditions: [], sequence: [] }); choose.push({ conditions: [], sequence: [] });
fireEvent(this, "value-changed", { fireEvent(this, "value-changed", {
value: { ...this.action, choose }, value: { ...this.action, choose },
@ -129,7 +136,9 @@ export class HaChooseAction extends LitElement implements ActionElement {
private _removeOption(ev: CustomEvent) { private _removeOption(ev: CustomEvent) {
const index = (ev.currentTarget as any).idx; const index = (ev.currentTarget as any).idx;
const choose = this.action.choose ? [...this.action.choose] : []; const choose = this.action.choose
? [...ensureArray(this.action.choose)]
: [];
choose.splice(index, 1); choose.splice(index, 1);
fireEvent(this, "value-changed", { fireEvent(this, "value-changed", {
value: { ...this.action, choose }, value: { ...this.action, choose },

View File

@ -640,6 +640,7 @@ export class HaIntegrationCard extends LitElement {
flex: 1; flex: 1;
margin-left: 8px; margin-left: 8px;
padding-top: 2px; padding-top: 2px;
padding-right: 2px;
} }
.content { .content {

View File

@ -1,3 +1,4 @@
import "../../../components/ha-svg-icon";
import { mdiPackageVariant, mdiCloud } from "@mdi/js"; import { mdiPackageVariant, mdiCloud } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip"; import "@polymer/paper-tooltip/paper-tooltip";
import { import {
@ -24,7 +25,7 @@ export class HaIntegrationHeader extends LitElement {
@property() public label!: string; @property() public label!: string;
@property() public manifest?: IntegrationManifest; @property({ attribute: false }) public manifest?: IntegrationManifest;
protected render(): TemplateResult { protected render(): TemplateResult {
let primary: string; let primary: string;
@ -84,6 +85,7 @@ export class HaIntegrationHeader extends LitElement {
<div class="primary">${primary}</div> <div class="primary">${primary}</div>
${secondary ? html`<div class="secondary">${secondary}</div>` : ""} ${secondary ? html`<div class="secondary">${secondary}</div>` : ""}
</div> </div>
${icons.length === 0 ${icons.length === 0
? "" ? ""
: html` : html`
@ -118,14 +120,17 @@ export class HaIntegrationHeader extends LitElement {
color: var(--text-on-state-color); color: var(--text-on-state-color);
text-align: center; text-align: center;
padding: 2px; padding: 2px;
border-top-left-radius: var(--ha-card-border-radius, 4px);
border-top-right-radius: var(--ha-card-border-radius, 4px);
} }
.header { .header {
display: flex; display: flex;
position: relative; position: relative;
padding: 16px 8px 8px 16px; padding: 0 8px 8px 16px;
} }
.header img { .header img {
margin-right: 16px; margin-right: 16px;
margin-top: 16px;
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
@ -142,6 +147,8 @@ export class HaIntegrationHeader extends LitElement {
} }
.primary { .primary {
font-size: 16px; font-size: 16px;
margin-top: 16px;
margin-right: 2px;
font-weight: 400; font-weight: 400;
color: var(--primary-text-color); color: var(--primary-text-color);
} }
@ -150,18 +157,20 @@ export class HaIntegrationHeader extends LitElement {
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }
.icons { .icons {
position: absolute; margin-right: 8px;
top: 0px; margin-left: auto;
right: 16px; height: 28px;
color: var(--text-on-state-color, var(--secondary-text-color)); color: var(--text-on-state-color, var(--secondary-text-color));
background-color: var(--state-color, #e0e0e0); background-color: var(--state-color, #e0e0e0);
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
padding: 1px 4px 2px; display: flex;
float: right;
} }
.icons ha-svg-icon { .icons ha-svg-icon {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin: 4px;
} }
paper-tooltip { paper-tooltip {
white-space: nowrap; white-space: nowrap;

View File

@ -28,7 +28,7 @@ import { stateIcon } from "../../../common/entity/state_icon";
import { isValidEntityId } from "../../../common/entity/valid_entity_id"; import { isValidEntityId } from "../../../common/entity/valid_entity_id";
import { iconColorCSS } from "../../../common/style/icon_color_css"; import { iconColorCSS } from "../../../common/style/icon_color_css";
import "../../../components/ha-card"; import "../../../components/ha-card";
import { getLightRgbColor, LightEntity } from "../../../data/light"; import { LightEntity } from "../../../data/light";
import { ActionHandlerEvent } from "../../../data/lovelace"; import { ActionHandlerEvent } from "../../../data/lovelace";
import { HomeAssistant } from "../../../types"; import { HomeAssistant } from "../../../types";
import { actionHandler } from "../common/directives/action-handler-directive"; import { actionHandler } from "../common/directives/action-handler-directive";
@ -301,14 +301,10 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
} }
private _computeColor(stateObj: HassEntity | LightEntity): string { private _computeColor(stateObj: HassEntity | LightEntity): string {
if ( if (this._config?.state_color && stateObj.attributes.rgb_color) {
!this._config?.state_color || return `rgb(${stateObj.attributes.rgb_color.join(",")})`;
computeStateDomain(stateObj) !== "light"
) {
return "";
} }
const rgb = getLightRgbColor(stateObj as LightEntity); return "";
return rgb ? `rgb(${rgb.slice(0, 3).join(",")})` : "";
} }
private _handleAction(ev: ActionHandlerEvent) { private _handleAction(ev: ActionHandlerEvent) {

View File

@ -5,6 +5,11 @@ import { GridCardConfig } from "./types";
import { LovelaceCardEditor } from "../types"; import { LovelaceCardEditor } from "../types";
const DEFAULT_COLUMNS = 3; const DEFAULT_COLUMNS = 3;
const SQUARE_ROW_HEIGHTS_BY_COLUMNS = {
1: 5,
2: 3,
3: 2,
};
class HuiGridCard extends HuiStackCard<GridCardConfig> { class HuiGridCard extends HuiStackCard<GridCardConfig> {
public static async getConfigElement(): Promise<LovelaceCardEditor> { public static async getConfigElement(): Promise<LovelaceCardEditor> {
@ -18,8 +23,11 @@ class HuiGridCard extends HuiStackCard<GridCardConfig> {
} }
if (this.square) { if (this.square) {
// When we're square, each row is size 2. const rowHeight = SQUARE_ROW_HEIGHTS_BY_COLUMNS[this.columns] || 1;
return (this._cards.length / this.columns) * 2; return (
(this._cards.length / this.columns) * rowHeight +
(this._config.title ? 1 : 0)
);
} }
const promises: Array<Promise<number> | number> = []; const promises: Array<Promise<number> | number> = [];
@ -28,11 +36,16 @@ class HuiGridCard extends HuiStackCard<GridCardConfig> {
promises.push(computeCardSize(element)); promises.push(computeCardSize(element));
} }
const results = await Promise.all(promises); const cardSizes = await Promise.all(promises);
const maxCardSize = Math.max(...results); let totalHeight = this._config.title ? 1 : 0;
return maxCardSize * (this._cards.length / this.columns); // Each column will adjust to max card size of it's row
for (let start = 0; start < cardSizes.length; start += this.columns) {
totalHeight += Math.max(...cardSizes.slice(start, start + this.columns));
}
return totalHeight;
} }
get columns() { get columns() {

View File

@ -21,11 +21,7 @@ import { stateIcon } from "../../../common/entity/state_icon";
import "../../../components/ha-card"; import "../../../components/ha-card";
import "../../../components/ha-icon-button"; import "../../../components/ha-icon-button";
import { UNAVAILABLE, UNAVAILABLE_STATES } from "../../../data/entity"; import { UNAVAILABLE, UNAVAILABLE_STATES } from "../../../data/entity";
import { import { LightEntity, lightSupportsDimming } from "../../../data/light";
getLightRgbColor,
LightEntity,
lightSupportsDimming,
} from "../../../data/light";
import { ActionHandlerEvent } from "../../../data/lovelace"; import { ActionHandlerEvent } from "../../../data/lovelace";
import { HomeAssistant } from "../../../types"; import { HomeAssistant } from "../../../types";
import { actionHandler } from "../common/directives/action-handler-directive"; import { actionHandler } from "../common/directives/action-handler-directive";
@ -247,8 +243,9 @@ export class HuiLightCard extends LitElement implements LovelaceCard {
if (stateObj.state === "off") { if (stateObj.state === "off") {
return ""; return "";
} }
const rgb = getLightRgbColor(stateObj); return stateObj.attributes.rgb_color
return rgb ? `rgb(${rgb.slice(0, 3).join(",")})` : ""; ? `rgb(${stateObj.attributes.rgb_color.join(",")})`
: "";
} }
private _handleAction(ev: ActionHandlerEvent) { private _handleAction(ev: ActionHandlerEvent) {

View File

@ -363,11 +363,22 @@ class LovelacePanel extends LitElement {
mode: previousMode, mode: previousMode,
} = this.lovelace!; } = this.lovelace!;
newConfig = this._checkLovelaceConfig(newConfig); newConfig = this._checkLovelaceConfig(newConfig);
let conf: LovelaceConfig;
// If strategy defined, apply it here.
if (newConfig.strategy) {
conf = await generateLovelaceDashboardStrategy({
config: newConfig,
hass: this.hass!,
narrow: this.narrow,
});
} else {
conf = newConfig;
}
try { try {
// Optimistic update // Optimistic update
this._updateLovelace({ this._updateLovelace({
config: newConfig, config: conf,
rawConfig: undefined, rawConfig: newConfig,
mode: "storage", mode: "storage",
}); });
this._ignoreNextUpdateEvent = true; this._ignoreNextUpdateEvent = true;

View File

@ -104,7 +104,7 @@ export class HuiGraphHeaderFooter extends LitElement
if (!this._coordinates) { if (!this._coordinates) {
return html` return html`
<div class="container"> <div class="container">
<ha-circular-progress active></ha-circular-progress> <ha-circular-progress active size="small"></ha-circular-progress>
</div> </div>
`; `;
} }
@ -210,7 +210,7 @@ export class HuiGraphHeaderFooter extends LitElement
return css` return css`
ha-circular-progress { ha-circular-progress {
position: absolute; position: absolute;
top: calc(50% - 28px); top: calc(50% - 14px);
} }
.container { .container {
display: flex; display: flex;

View File

@ -115,8 +115,8 @@ class LovelaceFullConfigEditor extends LitElement {
!this._saving && !this._saving &&
oldLovelace && oldLovelace &&
this.lovelace && this.lovelace &&
oldLovelace.config !== this.lovelace.config && oldLovelace.rawConfig !== this.lovelace.rawConfig &&
!deepEqual(oldLovelace.config, this.lovelace.config) !deepEqual(oldLovelace.rawConfig, this.lovelace.rawConfig)
) { ) {
showToast(this, { showToast(this, {
message: this.hass!.localize( message: this.hass!.localize(
@ -124,7 +124,7 @@ class LovelaceFullConfigEditor extends LitElement {
), ),
action: { action: {
action: () => { action: () => {
this.yamlEditor.value = safeDump(this.lovelace!.config); this.yamlEditor.value = safeDump(this.lovelace!.rawConfig);
}, },
text: this.hass!.localize( text: this.hass!.localize(
"ui.panel.lovelace.editor.raw_editor.reload" "ui.panel.lovelace.editor.raw_editor.reload"

View File

@ -22,6 +22,8 @@ const mql = matchMedia("(prefers-color-scheme: dark)");
export default <T extends Constructor<HassBaseEl>>(superClass: T) => export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
class extends superClass { class extends superClass {
private _themeApplied = false;
protected firstUpdated(changedProps) { protected firstUpdated(changedProps) {
super.firstUpdated(changedProps); super.firstUpdated(changedProps);
this.addEventListener("settheme", (ev) => { this.addEventListener("settheme", (ev) => {
@ -32,7 +34,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
storeState(this.hass!); storeState(this.hass!);
}); });
mql.addListener((ev) => this._applyTheme(ev.matches)); mql.addListener((ev) => this._applyTheme(ev.matches));
if (mql.matches) { if (!this._themeApplied && mql.matches) {
applyThemesOnElement( applyThemesOnElement(
document.documentElement, document.documentElement,
{ {
@ -51,6 +53,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
super.hassConnected(); super.hassConnected();
subscribeThemes(this.hass!.connection, (themes) => { subscribeThemes(this.hass!.connection, (themes) => {
this._themeApplied = true;
this._updateHass({ themes }); this._updateHass({ themes });
invalidateThemeCache(); invalidateThemeCache();
this._applyTheme(mql.matches); this._applyTheme(mql.matches);

View File

@ -122,6 +122,10 @@ export default hassAttributeUtil;
// Convert from internal snake_case format to user-friendly format // Convert from internal snake_case format to user-friendly format
export function formatAttributeName(value: string): string { export function formatAttributeName(value: string): string {
value = value.replace(/_/g, " ").replace(/\bid\b/g, "ID"); value = value
.replace(/_/g, " ")
.replace(/\bid\b/g, "ID")
.replace(/\bip\b/g, "IP")
.replace(/\bmac\b/g, "MAC");
return value.charAt(0).toUpperCase() + value.slice(1); return value.charAt(0).toUpperCase() + value.slice(1);
} }

View File

@ -1079,7 +1079,7 @@
"buttons": { "buttons": {
"add": "Добавете устройства чрез това устройство", "add": "Добавете устройства чрез това устройство",
"clusters": "Управление на клъстери", "clusters": "Управление на клъстери",
"device_children": "Преглед на дъщерни ", "device_children": "Преглед на дъщерни",
"reconfigure": "Преконфигуриране на устройство", "reconfigure": "Преконфигуриране на устройство",
"remove": "Премахване на устройство", "remove": "Премахване на устройство",
"zigbee_information": "Подпис на Zigbee устройството" "zigbee_information": "Подпис на Zigbee устройството"
@ -1129,7 +1129,7 @@
"observer": "Проверете Надзорника", "observer": "Проверете Надзорника",
"reboot": "Опитайте да рестартирате хоста", "reboot": "Опитайте да рестартирате хоста",
"system_health": "Проверете здравето на системата", "system_health": "Проверете здравето на системата",
"title": "Не може да се зареди Супервайзър-панела!", "title": "Не може да се зареди Supervisor панела!",
"wait": "Ако току-що сте стартирали, дайте достатъчно време за старт на Супервайзъра." "wait": "Ако току-що сте стартирали, дайте достатъчно време за старт на Супервайзъра."
} }
}, },
@ -1149,6 +1149,7 @@
"intergration_starting": "Стартиране на {integration}, не всичко ще бъде налично, докато процесът не приключи.", "intergration_starting": "Стартиране на {integration}, не всичко ще бъде налично, докато процесът не приключи.",
"service_call_failed": "Неуспешно повикване на услуга {service}.", "service_call_failed": "Неуспешно повикване на услуга {service}.",
"started": "Home Assistant стартира успешно!", "started": "Home Assistant стартира успешно!",
"starting": "Home Assistant стартира, не всичко ще е на разположение, докато не приключи.",
"triggered": "Задействане {name}", "triggered": "Задействане {name}",
"wrapping_up_startup": "Финализиране на стартирането, не всичко ще бъде налично, докато процесът не приключи." "wrapping_up_startup": "Финализиране на стартирането, не всичко ще бъде налично, докато процесът не приключи."
}, },
@ -1596,7 +1597,7 @@
"title": "Google Assistant" "title": "Google Assistant"
}, },
"integrations": "Интеграции", "integrations": "Интеграции",
"integrations_introduction": "Интеграциите за облака Assistant Cloud позволяват свързването облачни услуги, като се избягва публичното излагане на инсталацията Home Assistant в интернет.", "integrations_introduction": "Интеграциите за Home Assistant Cloud ви позволяват свързването с услуги в облака, без да се налага да излагате публично своя Home Assistant в интернет.",
"integrations_introduction2": "Проверете уебсайта за", "integrations_introduction2": "Проверете уебсайта за",
"integrations_link_all_features": "всички налични функции", "integrations_link_all_features": "всички налични функции",
"manage_account": "Управление на акаунта", "manage_account": "Управление на акаунта",
@ -1605,14 +1606,14 @@
"remote": { "remote": {
"access_is_being_prepared": "Подготвя се отдалечен достъп. Ще ви уведомим, когато е готов.", "access_is_being_prepared": "Подготвя се отдалечен достъп. Ще ви уведомим, когато е готов.",
"certificate_info": "Информация за сертификата", "certificate_info": "Информация за сертификата",
"info": "Облакът Home Assistant осигурява защитена отдалечена връзка с вашата инсталация, докато сте далеч от дома. ", "info": "Home Assistant Cloud осигурява сигурна отдалечена връзка с вашата инсталация, докато сте извън дома.",
"instance_is_available": "Вашата инсталация е налична на", "instance_is_available": "Вашата инсталация е налична на",
"instance_will_be_available": "Вашата инсталация ще е налична на", "instance_will_be_available": "Вашата инсталация ще е налична на",
"link_learn_how_it_works": "Научете как работи", "link_learn_how_it_works": "Научете как работи",
"title": "Дистанционен контрол" "title": "Дистанционен контрол"
}, },
"sign_out": "Отписване", "sign_out": "Отписване",
"thank_you_note": "Благодарим Ви, че сте част от Home Assistant Cloud. Именно заради хора като вас ние сме в състояние да направим страхотно изживяване при автоматизацията на дома за всички. Благодарим Ви!", "thank_you_note": "Благодарим Ви, че сте част от Home Assistant Cloud. Именно заради хора като вас ние сме в състояние да направим страхотно изживяване за всички при автоматизацията на дома. Благодарим Ви!",
"tts": { "tts": {
"default_language": "Език по подразбиране за използване", "default_language": "Език по подразбиране за използване",
"dialog": { "dialog": {
@ -1653,6 +1654,7 @@
"certificate_expiration_date": "Дата на изтичане на сертификата:", "certificate_expiration_date": "Дата на изтичане на сертификата:",
"certificate_information": "Информация за сертификата", "certificate_information": "Информация за сертификата",
"close": "Затвори", "close": "Затвори",
"fingerprint": "Отпечатък на сертификата:",
"will_be_auto_renewed": "ще бъде автоматично подновен" "will_be_auto_renewed": "ще бъде автоматично подновен"
}, },
"dialog_cloudhook": { "dialog_cloudhook": {
@ -2418,6 +2420,7 @@
"editor": { "editor": {
"activate_user": "Активиране на потребител", "activate_user": "Активиране на потребител",
"active": "Активен", "active": "Активен",
"active_tooltip": "Контролира дали потребителят може да влиза",
"admin": "Администратор", "admin": "Администратор",
"caption": "Преглед на потребителя", "caption": "Преглед на потребителя",
"change_password": "Смяна на парола", "change_password": "Смяна на парола",
@ -3008,6 +3011,8 @@
"edit": "Редактиране на изгледа", "edit": "Редактиране на изгледа",
"header": "Конфигурация на изглед", "header": "Конфигурация на изглед",
"header_name": "Конфигурация на изглед {name}", "header_name": "Конфигурация на изглед {name}",
"move_left": "Преместване на изгледа наляво",
"move_right": "Преместване на изгледа надясно",
"tab_badges": "Значки", "tab_badges": "Значки",
"tab_settings": "Настройки", "tab_settings": "Настройки",
"tab_visibility": "Видимост", "tab_visibility": "Видимост",

View File

@ -1197,7 +1197,19 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "S'està reconfigurant el dispositiu" "attribute": "Atribut",
"bind_header": "Vinculació",
"button_hide": "Amaga els detalls",
"button_show": "Mostra els detalls",
"cluster_header": "Clúster",
"configuration_complete": "Reconfiguració de dispositiu completada.",
"configuration_failed": "Ha fallat la reconfiguració del dispositiu. Pots trobar informació addicional als registres.",
"configuring_alt": "Configurant",
"heading": "S'està reconfigurant el dispositiu",
"in_progress": "El dispositiu s'està reconfigurant. Això pot trigar una estona.",
"min_max_change": "min/max/canvi",
"run_in_background": "Pots tancar aquest diàleg, la reconfiguració continuarà en segon pla.",
"start_reconfiguration": "Inicia la reconfiguració"
} }
}, },
"duration": { "duration": {
@ -1260,7 +1272,8 @@
"caption": "Àrees", "caption": "Àrees",
"data_table": { "data_table": {
"area": "Àrea", "area": "Àrea",
"devices": "Dispositius" "devices": "Dispositius",
"entities": "Entitats"
}, },
"delete": { "delete": {
"confirmation_text": "Tots els dispositius d'aquesta àrea quedaran sense assignar.", "confirmation_text": "Tots els dispositius d'aquesta àrea quedaran sense assignar.",
@ -1272,8 +1285,10 @@
"create": "Crea", "create": "Crea",
"default_name": "Nova àrea", "default_name": "Nova àrea",
"delete": "Elimina", "delete": "Elimina",
"linked_entities_caption": "Entitats",
"name": "Nom", "name": "Nom",
"name_required": "Nom obligatori", "name_required": "Nom obligatori",
"no_linked_entities": "No hi ha entitats vinculades amb aquesta àrea.",
"unknown_error": "Error desconegut", "unknown_error": "Error desconegut",
"update": "Actualitza" "update": "Actualitza"
}, },
@ -2924,7 +2939,12 @@
"node_status": "Estat del node", "node_status": "Estat del node",
"zwave_info": "Informació Z-Wave" "zwave_info": "Informació Z-Wave"
}, },
"logs": {
"log_level": "Nivell dels registres",
"title": "Registres de Z-Wave JS"
},
"navigation": { "navigation": {
"logs": "Registres",
"network": "Xarxa" "network": "Xarxa"
}, },
"network_status": { "network_status": {
@ -2951,6 +2971,13 @@
"dead": "Mort", "dead": "Mort",
"unknown": "Desconegut" "unknown": "Desconegut"
}, },
"reinterview_node": {
"in_progress": "S'està consultant el dispositiu. Això pot trigar una estona.",
"interview_complete": "Consulta del dispositiu completada.",
"interview_failed": "Ha fallat la consulta del dispositiu. Pots trobar informació addicional als registres.",
"start_reinterview": "Torna a iniciar consulta",
"title": "Torna a consultar un dispositiu Z-Wave"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "Cancel·la l'exclusió", "cancel_exclusion": "Cancel·la l'exclusió",
"controller_in_exclusion_mode": "El controlador Z-Wave ara està en mode d'exclusió.", "controller_in_exclusion_mode": "El controlador Z-Wave ara està en mode d'exclusió.",

View File

@ -1256,7 +1256,8 @@
"caption": "Oblasti", "caption": "Oblasti",
"data_table": { "data_table": {
"area": "Oblast", "area": "Oblast",
"devices": "Zařízení" "devices": "Zařízení",
"entities": "Entity"
}, },
"delete": { "delete": {
"confirmation_text": "Všechna zařízení v této oblasti budou nastavena jako nepřiřazena.", "confirmation_text": "Všechna zařízení v této oblasti budou nastavena jako nepřiřazena.",
@ -1268,8 +1269,10 @@
"create": "VYTVOŘIT", "create": "VYTVOŘIT",
"default_name": "Nová oblast", "default_name": "Nová oblast",
"delete": "Odstranit", "delete": "Odstranit",
"linked_entities_caption": "Entity",
"name": "Název", "name": "Název",
"name_required": "Název je povinný", "name_required": "Název je povinný",
"no_linked_entities": "S touto oblastí nejsou spojeny žádné entity.",
"unknown_error": "Neznámá chyba", "unknown_error": "Neznámá chyba",
"update": "Aktualizovat" "update": "Aktualizovat"
}, },

View File

@ -1197,7 +1197,22 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "Reconfiguring device" "attribute": "Attribute",
"battery_device_warning": "You will need to wake battery powered devices before starting the reconfiguration process. Refer to your device's manual for instructions on how to wake the device.",
"bind_header": "Binding",
"button_hide": "Hide Details",
"button_show": "Show Details",
"cluster_header": "Cluster",
"configuration_complete": "Device reconfiguration complete.",
"configuration_failed": "The device reconfiguration failed. Additional information may be available in the logs.",
"configuring_alt": "Configuring",
"heading": "Reconfiguring device",
"in_progress": "The device is being reconfigured. This may take some time.",
"introduction": "Reconfigure a device on your Zigbee network. Use this feature if your device is not functioning correctly.",
"min_max_change": "min/max/change",
"reporting_header": "Reporting",
"run_in_background": "You can close this dialog and the reconfiguration will continue in the background.",
"start_reconfiguration": "Start Reconfiguration"
} }
}, },
"duration": { "duration": {
@ -1260,7 +1275,8 @@
"caption": "Areas", "caption": "Areas",
"data_table": { "data_table": {
"area": "Area", "area": "Area",
"devices": "Devices" "devices": "Devices",
"entities": "Entities"
}, },
"delete": { "delete": {
"confirmation_text": "All devices in this area will become unassigned.", "confirmation_text": "All devices in this area will become unassigned.",
@ -1272,8 +1288,10 @@
"create": "Create", "create": "Create",
"default_name": "New Area", "default_name": "New Area",
"delete": "Delete", "delete": "Delete",
"linked_entities_caption": "Entities",
"name": "Name", "name": "Name",
"name_required": "Name is required", "name_required": "Name is required",
"no_linked_entities": "There are no entities linked to this area.",
"unknown_error": "Unknown error", "unknown_error": "Unknown error",
"update": "Update" "update": "Update"
}, },
@ -2924,7 +2942,12 @@
"node_status": "Node Status", "node_status": "Node Status",
"zwave_info": "Z-Wave Info" "zwave_info": "Z-Wave Info"
}, },
"logs": {
"log_level": "Log Level",
"title": "Z-Wave JS Logs"
},
"navigation": { "navigation": {
"logs": "Logs",
"network": "Network" "network": "Network"
}, },
"network_status": { "network_status": {

View File

@ -1197,7 +1197,22 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "Seadme sätete muutmine" "attribute": "Atribuut",
"battery_device_warning": "Patareitoitel seadmed peavad olema ärkvel, et neid taasseadistada. Seadme äratamiseks vaata oma seadme kasutusjuhendit.",
"bind_header": "Sidumine",
"button_hide": "Peida üksikasjad",
"button_show": "Kuva üksikasjad",
"cluster_header": "Kobar",
"configuration_complete": "Seadme ümberseadistamine on lõpule viidud.",
"configuration_failed": "Seadme ümberseadistamine nurjus. Lisateavet võib saada logidest.",
"configuring_alt": "Seadistan",
"heading": "Seadme sätete muutmine",
"in_progress": "Seadet muudetakse ümber. See võib võtta aega.",
"introduction": "Seadista uuesti seadet Zigbee võrgus. Kasuta seda funktsiooni kui seadmel on puuduv või vale funktsionaalsus.",
"min_max_change": "min/max/muutus",
"reporting_header": "Aruandlus",
"run_in_background": "Saad selle dialoogi sulgeda ja ümberseadistamine jätkub taustal.",
"start_reconfiguration": "Alusta ümberseadistamist"
} }
}, },
"duration": { "duration": {
@ -1260,7 +1275,8 @@
"caption": "Alade register", "caption": "Alade register",
"data_table": { "data_table": {
"area": "Ala", "area": "Ala",
"devices": "Seadmed" "devices": "Seadmed",
"entities": "Olemid"
}, },
"delete": { "delete": {
"confirmation_text": "Kõik sellele ala seadmed jäävad peremehetuks.", "confirmation_text": "Kõik sellele ala seadmed jäävad peremehetuks.",
@ -1272,8 +1288,10 @@
"create": "LOO", "create": "LOO",
"default_name": "Uus ala", "default_name": "Uus ala",
"delete": "KUSTUTA", "delete": "KUSTUTA",
"linked_entities_caption": "Olemid",
"name": "Nimi", "name": "Nimi",
"name_required": "Nimi on kohustuslik", "name_required": "Nimi on kohustuslik",
"no_linked_entities": "Selle alaga pole seotud ühtegi olemit.",
"unknown_error": "Tundmatu viga", "unknown_error": "Tundmatu viga",
"update": "UUENDA" "update": "UUENDA"
}, },
@ -2924,7 +2942,12 @@
"node_status": "Sõlme olek", "node_status": "Sõlme olek",
"zwave_info": "Z-Wave teave" "zwave_info": "Z-Wave teave"
}, },
"logs": {
"log_level": "Logimise tase",
"title": "Z-Wave JS logid"
},
"navigation": { "navigation": {
"logs": "Logid",
"network": "Võrk" "network": "Võrk"
}, },
"network_status": { "network_status": {
@ -2951,6 +2974,16 @@
"dead": "Kadunud", "dead": "Kadunud",
"unknown": "Teadmata" "unknown": "Teadmata"
}, },
"reinterview_node": {
"battery_device_warning": "Patareitoitel seadmed peavad olema ärkvel, et neid küsitleda. Seadme äratamiseks vaata oma seadme kasutusjuhendit.",
"in_progress": "Seadet küsitletakse. See võib võtta aega.",
"interview_complete": "Seadme küsitlemine on lõpetatud.",
"interview_failed": "Seadme küsitlemine nurjus. Lisateave võib olla kättesaadav logides.",
"introduction": "Küsitle uuesti seadet Z-Wave-võrgus. Kasuta seda funktsiooni kui seadmel on puuduv või vale funktsionaalsus.",
"run_in_background": "Saad selle dialoogi sulgeda ja küsitlus jätkub taustal.",
"start_reinterview": "Alusta küsitlust uuesti",
"title": "Z-Wave seadme taasküsitlemine"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "Tühista välistamine", "cancel_exclusion": "Tühista välistamine",
"controller_in_exclusion_mode": "Z-Wave kontroller on nüüd välistamisrežiimis.", "controller_in_exclusion_mode": "Z-Wave kontroller on nüüd välistamisrežiimis.",

View File

@ -561,9 +561,12 @@
}, },
"light": { "light": {
"brightness": "Luminosità", "brightness": "Luminosità",
"cold_white_value": "Luminosità bianca fredda",
"color_brightness": "Luminosità del colore",
"color_temperature": "Temperatura colore", "color_temperature": "Temperatura colore",
"effect": "Effetto", "effect": "Effetto",
"white_value": "Valore bianco" "warm_white_value": "Luminosità bianca calda",
"white_value": "Luminosità del bianco"
}, },
"lock": { "lock": {
"code": "Codice", "code": "Codice",
@ -1194,7 +1197,22 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "Riconfigurazione del dispositivo" "attribute": "Attributo",
"battery_device_warning": "Sarà necessario riattivare i dispositivi alimentati a batteria prima di avviare il processo di riconfigurazione. Fare riferimento al manuale del dispositivo per istruzioni su come riattivare il dispositivo.",
"bind_header": "Collegamento",
"button_hide": "Nascondi dettagli",
"button_show": "Mostra dettagli",
"cluster_header": "Grappolo",
"configuration_complete": "Riconfigurazione del dispositivo completata.",
"configuration_failed": "La riconfigurazione del dispositivo non è riuscita. Ulteriori informazioni potrebbero essere disponibili nei registri.",
"configuring_alt": "Configurazione",
"heading": "Riconfigurazione del dispositivo",
"in_progress": "Il dispositivo è in fase di riconfigurazione. Potrebbe volerci un po' di tempo.",
"introduction": "Riconfigura un dispositivo sulla tua rete Zigbee. Usa questa funzione se il tuo dispositivo non funziona correttamente.",
"min_max_change": "min/max/cambio",
"reporting_header": "Segnalazione",
"run_in_background": "È possibile chiudere questa finestra di dialogo e la riconfigurazione continuerà in background.",
"start_reconfiguration": "Avvia la riconfigurazione"
} }
}, },
"duration": { "duration": {
@ -1257,7 +1275,8 @@
"caption": "Aree", "caption": "Aree",
"data_table": { "data_table": {
"area": "Area", "area": "Area",
"devices": "Dispositivi" "devices": "Dispositivi",
"entities": "Entità"
}, },
"delete": { "delete": {
"confirmation_text": "Tutti i dispositivi in quest'area non saranno assegnati.", "confirmation_text": "Tutti i dispositivi in quest'area non saranno assegnati.",
@ -1269,8 +1288,10 @@
"create": "Crea", "create": "Crea",
"default_name": "Nuova area", "default_name": "Nuova area",
"delete": "Elimina", "delete": "Elimina",
"linked_entities_caption": "Entità",
"name": "Nome", "name": "Nome",
"name_required": "Il nome è obbligatorio", "name_required": "Il nome è obbligatorio",
"no_linked_entities": "Non ci sono entità collegate a quest'area.",
"unknown_error": "Errore sconosciuto", "unknown_error": "Errore sconosciuto",
"update": "Aggiorna" "update": "Aggiorna"
}, },
@ -2936,6 +2957,9 @@
"header": "Configurazione del dispositivo Z-Wave", "header": "Configurazione del dispositivo Z-Wave",
"introduction": "Gestire e regolare i parametri di configurazione specifici del dispositivo (nodo) per il dispositivo selezionato", "introduction": "Gestire e regolare i parametri di configurazione specifici del dispositivo (nodo) per il dispositivo selezionato",
"parameter_is_read_only": "Questo parametro è di sola lettura.", "parameter_is_read_only": "Questo parametro è di sola lettura.",
"set_param_accepted": "Il parametro è stato aggiornato.",
"set_param_error": "Si è verificato un errore.",
"set_param_queued": "La modifica del parametro è stata messa in coda e verrà aggiornata quando il dispositivo si riattiva.",
"zwave_js_device_database": "Database dei dispositivi Z-Wave JS" "zwave_js_device_database": "Database dei dispositivi Z-Wave JS"
}, },
"node_status": { "node_status": {
@ -2945,6 +2969,16 @@
"dead": "Disattivo", "dead": "Disattivo",
"unknown": "Sconosciuto" "unknown": "Sconosciuto"
}, },
"reinterview_node": {
"battery_device_warning": "Sarà necessario riattivare i dispositivi alimentati a batteria prima di iniziare la nuova interrogazione. Fare riferimento al manuale del dispositivo per istruzioni su come riattivare il dispositivo.",
"in_progress": "Il dispositivo viene interrogato. Potrebbe volerci un po' di tempo.",
"interview_complete": "Interrogazione del dispositivo completata.",
"interview_failed": "L'interrogazione al dispositivo non è riuscita. Ulteriori informazioni potrebbero essere disponibili nei registri.",
"introduction": "Interroga nuovamente un dispositivo sulla tua rete Z-Wave. Usa questa funzione se il tuo dispositivo ha funzionalità mancanti o errate.",
"run_in_background": "Puoi chiudere questa finestra di dialogo e l'interrogazione continuerà in background.",
"start_reinterview": "Inizia una nuova interrogazione",
"title": "Re-interroga un dispositivo Z-Wave"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "Annulla esclusione", "cancel_exclusion": "Annulla esclusione",
"controller_in_exclusion_mode": "Il tuo controller Z-Wave è ora in modalità di esclusione.", "controller_in_exclusion_mode": "Il tuo controller Z-Wave è ora in modalità di esclusione.",

View File

@ -561,8 +561,11 @@
}, },
"light": { "light": {
"brightness": "밝기", "brightness": "밝기",
"cold_white_value": "주광색 밝기",
"color_brightness": "색상 밝기",
"color_temperature": "색온도", "color_temperature": "색온도",
"effect": "효과", "effect": "효과",
"warm_white_value": "전구색 밝기",
"white_value": "흰색 값" "white_value": "흰색 값"
}, },
"lock": { "lock": {
@ -1194,7 +1197,22 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "기기 재구성 중" "attribute": "속성",
"battery_device_warning": "재구성하기 전에 배터리 전원 장치의 절전 모드를 해제해야 합니다. 절전 모드를 해제하는 방법은 기기 설명서를 참조하십시오.",
"bind_header": "묶기",
"button_hide": "세부 정보 숨기기",
"button_show": "세부 정보 표시",
"cluster_header": "클러스터",
"configuration_complete": "장치 재구성이 완료되었습니다.",
"configuration_failed": "장치 재구성에 실패했습니다. 로그에서 정보를 확인할 수 있습니다.",
"configuring_alt": "구성",
"heading": "기기 재구성 중",
"in_progress": "장치가 재구성 중입니다. 시간이 좀 걸릴 수 있습니다.",
"introduction": "Zigbee 네트워크에서 장치를 재구성합니다. 장치가 올바르게 작동하지 않는 경우에 이 기능을 사용하십시오.",
"min_max_change": "최소/최대/변경",
"reporting_header": "보고",
"run_in_background": "이 대화 상자를 닫을 수 있으며 재구성은 백그라운드에서 계속됩니다.",
"start_reconfiguration": "재구성 시작"
} }
}, },
"duration": { "duration": {
@ -2944,6 +2962,16 @@
"dead": "사용불가", "dead": "사용불가",
"unknown": "알 수 없음" "unknown": "알 수 없음"
}, },
"reinterview_node": {
"battery_device_warning": "재인터뷰를 시작하기 전에 배터리 전원 장치의 절전 모드를 해제해야 합니다. 절전 모드를 해제하는 방법은 기기 설명서를 참조하십시오.",
"in_progress": "장치가 인터뷰중입니다. 시간이 좀 걸릴 수 있습니다.",
"interview_complete": "장치 인터뷰가 완료되었습니다.",
"interview_failed": "장치 인터뷰에 실패했습니다. 로그에서 정보를 확인할 수 있습니다.",
"introduction": "Z-Wave 네트워크 상의 장치를 다시 인터뷰합니다. 장치가 사라지거나 오동작할 경우에 이 기능을 사용하십시오.",
"run_in_background": "이 대화 상자를 닫을 수 있으며 인터뷰는 백그라운드에서 계속됩니다.",
"start_reinterview": "재인터뷰 시작",
"title": "Z-Wave 장치 재인터뷰"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "제외 취소하기", "cancel_exclusion": "제외 취소하기",
"controller_in_exclusion_mode": "Z-Wave 컨트롤러가 이제 제외 모드에 있습니다", "controller_in_exclusion_mode": "Z-Wave 컨트롤러가 이제 제외 모드에 있습니다",

View File

@ -561,9 +561,12 @@
}, },
"light": { "light": {
"brightness": "Lysstyrke", "brightness": "Lysstyrke",
"cold_white_value": "Kald hvit lysstyrke",
"color_brightness": "Farge lysstyrke",
"color_temperature": "Fargetemperatur", "color_temperature": "Fargetemperatur",
"effect": "Effekt", "effect": "Effekt",
"white_value": "Hvit verdi" "warm_white_value": "Varm hvit lysstyrke",
"white_value": "Hvit lysstyrke"
}, },
"lock": { "lock": {
"code": "Kode", "code": "Kode",
@ -2948,6 +2951,16 @@
"dead": "Død", "dead": "Død",
"unknown": "Ukjent" "unknown": "Ukjent"
}, },
"reinterview_node": {
"battery_device_warning": "Du må vekke batteridrevne enheter før du begynner på nytt intervju. Se enhetens håndbok for instruksjoner om hvordan du vekker enheten.",
"in_progress": "Enheten blir intervjuet. Dette kan ta litt tid.",
"interview_complete": "Enhetsintervjuet er fullført.",
"interview_failed": "Enhetsintervjuet mislyktes. Ytterligere informasjon kan være tilgjengelig i loggene.",
"introduction": "Intervju en enhet på nytt på Z-Wave-nettverket. Bruk denne funksjonen hvis enheten mangler eller ikke har feil funksjonalitet.",
"run_in_background": "Du kan lukke denne dialogen, og intervjuet fortsetter i bakgrunnen.",
"start_reinterview": "Start Re-intervju",
"title": "Intervju en Z-Wave-enhet på nytt"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "Avbryt ekskludering", "cancel_exclusion": "Avbryt ekskludering",
"controller_in_exclusion_mode": "Z-Wave-kontrolleren er nå i ekskluderingsmodus", "controller_in_exclusion_mode": "Z-Wave-kontrolleren er nå i ekskluderingsmodus",

View File

@ -561,8 +561,11 @@
}, },
"light": { "light": {
"brightness": "Helderheid", "brightness": "Helderheid",
"cold_white_value": "Koud wit helderheid",
"color_brightness": "Kleurhelderheid",
"color_temperature": "Kleurtemperatuur", "color_temperature": "Kleurtemperatuur",
"effect": "Effect", "effect": "Effect",
"warm_white_value": "Warm wit helderheid",
"white_value": "Witwaarde" "white_value": "Witwaarde"
}, },
"lock": { "lock": {
@ -1194,7 +1197,22 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "Apparaat opnieuw configureren" "attribute": "Attribuut",
"battery_device_warning": "U moet apparaten met een batterij wekken voordat u het herconfiguratieproces start. Raadpleeg de handleiding van uw toestel voor instructies over hoe u het toestel kunt wekken.",
"bind_header": "Binding",
"button_hide": "Details verbergen",
"button_show": "Details weergeven",
"cluster_header": "Cluster",
"configuration_complete": "Herconfiguratie van apparaat voltooid.",
"configuration_failed": "De herconfiguratie van het apparaat is mislukt. Mogelijk is er aanvullende informatie beschikbaar in de logboeken.",
"configuring_alt": "Configureren",
"heading": "Apparaat opnieuw configureren",
"in_progress": "Het apparaat wordt opnieuw geconfigureerd. Dit kan wat tijd kosten.",
"introduction": "Herconfigureer een apparaat op je Zigbee netwerk. Gebruik deze functie als uw apparaat niet correct functioneert.",
"min_max_change": "mix/max/verander",
"reporting_header": "Rapporteren",
"run_in_background": "U kunt dit dialoogvenster sluiten en de herconfiguratie wordt op de achtergrond voortgezet.",
"start_reconfiguration": "Start herconfiguratie"
} }
}, },
"duration": { "duration": {
@ -1257,7 +1275,8 @@
"caption": "Gebieden", "caption": "Gebieden",
"data_table": { "data_table": {
"area": "Gebied", "area": "Gebied",
"devices": "Apparaten" "devices": "Apparaten",
"entities": "Entiteiten"
}, },
"delete": { "delete": {
"confirmation_text": "Alle apparaten in dit gebied zullen niet meer toegewezen zijn.", "confirmation_text": "Alle apparaten in dit gebied zullen niet meer toegewezen zijn.",
@ -1269,8 +1288,10 @@
"create": "Aanmaken", "create": "Aanmaken",
"default_name": "Nieuw Gebied", "default_name": "Nieuw Gebied",
"delete": "Verwijderen", "delete": "Verwijderen",
"linked_entities_caption": "Entiteiten",
"name": "Naam", "name": "Naam",
"name_required": "Naam is vereist", "name_required": "Naam is vereist",
"no_linked_entities": "Er zijn geen entiteiten gekoppeld aan dit gebied.",
"unknown_error": "Onbekende fout", "unknown_error": "Onbekende fout",
"update": "Bijwerken" "update": "Bijwerken"
}, },

View File

@ -1197,7 +1197,22 @@
} }
}, },
"zha_reconfigure_device": { "zha_reconfigure_device": {
"heading": "Перенастройка устройства" "attribute": "Атрибут",
"battery_device_warning": "Перед повторной настройкой устройства с батарейным питанием необходимо вывести из спящего режима. О том, как это сделать, Вы можете узнать из инструкций к Вашему устройству.",
"bind_header": "Привязка",
"button_hide": "Скрыть подробности",
"button_show": "Подробнее",
"cluster_header": "Кластер",
"configuration_complete": "Настройка устройства завершена",
"configuration_failed": "Не удалось перенастроить устройство. Дополнительная информация может быть получена в журналах.",
"configuring_alt": "Настройка",
"heading": "Перенастройка устройства",
"in_progress": "Устройство настраивается, это может занять некоторое время.",
"introduction": "Повторная настройка устройства в Вашей сети Zigbee. Используйте эту функцию, если устройство работает некорректно.",
"min_max_change": "мин/макс/изменение",
"reporting_header": "Получение отчёта",
"run_in_background": "Вы можете закрыть это диалоговое окно, настройка продолжится в фоновом режиме.",
"start_reconfiguration": "Начать повторную настройку"
} }
}, },
"duration": { "duration": {
@ -1260,7 +1275,8 @@
"caption": "Помещения", "caption": "Помещения",
"data_table": { "data_table": {
"area": "Помещение", "area": "Помещение",
"devices": "Устройства" "devices": "Устройства",
"entities": "Объекты"
}, },
"delete": { "delete": {
"confirmation_text": "Связанные устройства потеряют привязку к помещению.", "confirmation_text": "Связанные устройства потеряют привязку к помещению.",
@ -1272,8 +1288,10 @@
"create": "Добавить", "create": "Добавить",
"default_name": "Новое помещение", "default_name": "Новое помещение",
"delete": "Удалить", "delete": "Удалить",
"linked_entities_caption": "Объекты",
"name": "Название", "name": "Название",
"name_required": "Укажите название помещения", "name_required": "Укажите название помещения",
"no_linked_entities": "С этим помещением не связаны никакие объекты.",
"unknown_error": "Неизвестная ошибка.", "unknown_error": "Неизвестная ошибка.",
"update": "Обновить" "update": "Обновить"
}, },
@ -2924,7 +2942,12 @@
"node_status": "Статус узла", "node_status": "Статус узла",
"zwave_info": "Информация о Z-Wave" "zwave_info": "Информация о Z-Wave"
}, },
"logs": {
"log_level": "Уровень",
"title": "Журналы Z-Wave JS"
},
"navigation": { "navigation": {
"logs": "Журналы",
"network": "Сеть" "network": "Сеть"
}, },
"network_status": { "network_status": {
@ -2951,6 +2974,16 @@
"dead": "Мертвый", "dead": "Мертвый",
"unknown": "Неизвестно" "unknown": "Неизвестно"
}, },
"reinterview_node": {
"battery_device_warning": "Перед повторным опросом устройства с батарейным питанием необходимо вывести из спящего режима. О том, как это сделать, Вы можете узнать из инструкций к Вашему устройству.",
"in_progress": "Устройство опрашивается, это может занять некоторое время.",
"interview_complete": "Опрос устройства завершен.",
"interview_failed": "Опрос устройства не удался. Дополнительная информация может быть получена в журналах.",
"introduction": "Повторный опрос устройства в Вашей сети Z-Wave. Используйте эту функцию, если это устройство не работает или работает неправильно.",
"run_in_background": "Вы можете закрыть это диалоговое окно, опрос продолжится в фоновом режиме.",
"start_reinterview": "Начать повторный опрос",
"title": "Повторный опрос устройства Z-Wave"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "Отменить отключение", "cancel_exclusion": "Отменить отключение",
"controller_in_exclusion_mode": "Ваш контроллер Z-Wave находится в режиме отключения.", "controller_in_exclusion_mode": "Ваш контроллер Z-Wave находится в режиме отключения.",

View File

@ -1103,7 +1103,7 @@
"force_narrow": { "force_narrow": {
"header": "ซ่อนแถบด้านข้างเสมอ" "header": "ซ่อนแถบด้านข้างเสมอ"
}, },
"is_owner": "ในฐานะ \"เจ้าของ\"", "is_owner": "คุณเป็นเจ้าของ",
"language": { "language": {
"dropdown_label": "ภาษา", "dropdown_label": "ภาษา",
"header": "ภาษา", "header": "ภาษา",

View File

@ -561,9 +561,12 @@
}, },
"light": { "light": {
"brightness": "亮度", "brightness": "亮度",
"cold_white_value": "冷白亮度",
"color_brightness": "色彩亮度",
"color_temperature": "色溫", "color_temperature": "色溫",
"effect": "場景", "effect": "場景",
"white_value": "白色值" "warm_white_value": "暖白亮度",
"white_value": "白亮度"
}, },
"lock": { "lock": {
"code": "密碼", "code": "密碼",
@ -2948,6 +2951,16 @@
"dead": "失效", "dead": "失效",
"unknown": "未知" "unknown": "未知"
}, },
"reinterview_node": {
"battery_device_warning": "電池供電裝置必須先喚醒以重新探訪。請參考您的裝置手冊以了解如何喚醒裝置。",
"in_progress": "正在探訪裝置,可能需要一點時間。",
"interview_complete": "裝置探訪完成。",
"interview_failed": "裝置探訪失敗。日誌中可能包含其他相關資訊。",
"introduction": "重新探訪 Z-Wave 網路中的裝置。假如裝置缺少、或者功能不正確時,請使用此選項。",
"run_in_background": "可以關閉此對話框、探訪將於背景繼續執行。",
"start_reinterview": "開始重新探訪",
"title": "重新探訪 Z-Wave 裝置"
},
"remove_node": { "remove_node": {
"cancel_exclusion": "取消排除", "cancel_exclusion": "取消排除",
"controller_in_exclusion_mode": "Z-Wave 控制器目前處於排除模式。", "controller_in_exclusion_mode": "Z-Wave 控制器目前處於排除模式。",