mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Merge pull request #10880 from home-assistant/dev
This commit is contained in:
commit
61bae5da64
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="home-assistant-frontend",
|
name="home-assistant-frontend",
|
||||||
version="20211211.0",
|
version="20211212.0",
|
||||||
description="The Home Assistant frontend",
|
description="The Home Assistant frontend",
|
||||||
url="https://github.com/home-assistant/frontend",
|
url="https://github.com/home-assistant/frontend",
|
||||||
author="The Home Assistant Authors",
|
author="The Home Assistant Authors",
|
||||||
|
@ -18,13 +18,9 @@ export class HaChip extends LitElement {
|
|||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="mdc-chip">
|
<div class="mdc-chip ${this.noText ? "no-text" : ""}">
|
||||||
${this.hasIcon
|
${this.hasIcon
|
||||||
? html`<div
|
? html`<div class="mdc-chip__icon mdc-chip__icon--leading">
|
||||||
class="mdc-chip__icon mdc-chip__icon--leading ${this.noText
|
|
||||||
? "no-text"
|
|
||||||
: ""}"
|
|
||||||
>
|
|
||||||
<slot name="icon"></slot>
|
<slot name="icon"></slot>
|
||||||
</div>`
|
</div>`
|
||||||
: null}
|
: null}
|
||||||
@ -49,6 +45,10 @@ export class HaChip extends LitElement {
|
|||||||
color: var(--ha-chip-text-color, var(--primary-text-color));
|
color: var(--ha-chip-text-color, var(--primary-text-color));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mdc-chip.no-text {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.mdc-chip:hover {
|
.mdc-chip:hover {
|
||||||
color: var(--ha-chip-text-color, var(--primary-text-color));
|
color: var(--ha-chip-text-color, var(--primary-text-color));
|
||||||
}
|
}
|
||||||
@ -57,8 +57,8 @@ export class HaChip extends LitElement {
|
|||||||
--mdc-icon-size: 20px;
|
--mdc-icon-size: 20px;
|
||||||
color: var(--ha-chip-icon-color, var(--ha-chip-text-color));
|
color: var(--ha-chip-icon-color, var(--ha-chip-text-color));
|
||||||
}
|
}
|
||||||
.mdc-chip
|
.mdc-chip.no-text
|
||||||
.mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden).no-text {
|
.mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden) {
|
||||||
margin-right: -4px;
|
margin-right: -4px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -50,6 +50,13 @@ export class HaStateTrigger extends LitElement implements TriggerElement {
|
|||||||
if (!changedProperties.has("trigger")) {
|
if (!changedProperties.has("trigger")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
this.trigger.for &&
|
||||||
|
typeof this.trigger.for === "object" &&
|
||||||
|
this.trigger.for.milliseconds === 0
|
||||||
|
) {
|
||||||
|
delete this.trigger.for.milliseconds;
|
||||||
|
}
|
||||||
// Check for templates in trigger. If found, revert to YAML mode.
|
// Check for templates in trigger. If found, revert to YAML mode.
|
||||||
if (this.trigger && hasTemplate(this.trigger)) {
|
if (this.trigger && hasTemplate(this.trigger)) {
|
||||||
fireEvent(
|
fireEvent(
|
||||||
|
@ -129,7 +129,11 @@ class HaConfigZwave extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
|||||||
<span
|
<span
|
||||||
>[[localize('ui.panel.config.zwave.node_management.header')]]</span
|
>[[localize('ui.panel.config.zwave.node_management.header')]]</span
|
||||||
>
|
>
|
||||||
<ha-icon-button class="toggle-help-icon" on-click="toggleHelp">
|
<ha-icon-button
|
||||||
|
class="toggle-help-icon"
|
||||||
|
on-click="toggleHelp"
|
||||||
|
label="[[localize('ui.common.help')]]"
|
||||||
|
>
|
||||||
<ha-icon icon="hass:help-circle"></ha-icon>
|
<ha-icon icon="hass:help-circle"></ha-icon>
|
||||||
</ha-icon-button>
|
</ha-icon-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,7 @@ import {
|
|||||||
svg,
|
svg,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit";
|
} from "lit";
|
||||||
import { customElement, property, state, query } from "lit/decorators";
|
import { customElement, property, query, state } from "lit/decorators";
|
||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
import { UNIT_F } from "../../../common/const";
|
import { UNIT_F } from "../../../common/const";
|
||||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||||
@ -427,6 +427,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
|||||||
@click=${this._handleAction}
|
@click=${this._handleAction}
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
.path=${modeIcons[mode]}
|
.path=${modeIcons[mode]}
|
||||||
|
.label=${this.hass!.localize(`component.climate.state._.${mode}`)}
|
||||||
>
|
>
|
||||||
</ha-icon-button>
|
</ha-icon-button>
|
||||||
`;
|
`;
|
||||||
|
@ -50,6 +50,7 @@ export class HuiButtonsBase extends LitElement {
|
|||||||
.stateObj=${stateObj}
|
.stateObj=${stateObj}
|
||||||
.overrideIcon=${entityConf.icon}
|
.overrideIcon=${entityConf.icon}
|
||||||
.overrideImage=${entityConf.image}
|
.overrideImage=${entityConf.image}
|
||||||
|
class=${name ? "" : "no-text"}
|
||||||
stateColor
|
stateColor
|
||||||
slot="icon"
|
slot="icon"
|
||||||
></state-badge>
|
></state-badge>
|
||||||
@ -85,9 +86,21 @@ export class HuiButtonsBase extends LitElement {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
state-badge {
|
state-badge {
|
||||||
|
display: inline-flex;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
text-align: start;
|
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin-left: -4px;
|
||||||
|
margin-top: -2px;
|
||||||
|
}
|
||||||
|
state-badge.no-text {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
margin-left: -3px;
|
||||||
|
margin-top: -3px;
|
||||||
}
|
}
|
||||||
ha-chip {
|
ha-chip {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
@ -688,7 +688,7 @@
|
|||||||
"open_cover": "Open cover",
|
"open_cover": "Open cover",
|
||||||
"close_cover": "Close cover",
|
"close_cover": "Close cover",
|
||||||
"open_tilt_cover": "Open cover tilt",
|
"open_tilt_cover": "Open cover tilt",
|
||||||
"close_tile_cover": "Close cover tilt",
|
"close_tilt_cover": "Close cover tilt",
|
||||||
"stop_cover": "Stop cover from moving"
|
"stop_cover": "Stop cover from moving"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3023,7 +3023,8 @@
|
|||||||
"title": "Z-Wave JS Logs",
|
"title": "Z-Wave JS Logs",
|
||||||
"log_level": "Log Level",
|
"log_level": "Log Level",
|
||||||
"subscribed_to_logs": "Subscribed to Z-Wave JS Log Messages…",
|
"subscribed_to_logs": "Subscribed to Z-Wave JS Log Messages…",
|
||||||
"log_level_changed": "Log Level changed to: {level}"
|
"log_level_changed": "Log Level changed to: {level}",
|
||||||
|
"download_logs": "Download logs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user