20221108.0 (#14332)

This commit is contained in:
Bram Kragten 2022-11-08 14:19:23 +01:00 committed by GitHub
commit c92e6423e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 15 deletions

View File

@ -283,7 +283,7 @@ export class DemoIntegrationCard extends LitElement {
.deviceRegistryEntries=${createDeviceRegistryEntries( .deviceRegistryEntries=${createDeviceRegistryEntries(
info.items[0] info.items[0]
)} )}
?disabled=${info.disabled} ?entryDisabled=${info.disabled}
.selectedConfigEntryId=${info.highlight} .selectedConfigEntryId=${info.highlight}
></ha-integration-card> ></ha-integration-card>
` `

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "home-assistant-frontend" name = "home-assistant-frontend"
version = "20221102.1" version = "20221108.0"
license = {text = "Apache-2.0"} license = {text = "Apache-2.0"}
description = "The Home Assistant frontend" description = "The Home Assistant frontend"
readme = "README.md" readme = "README.md"

View File

@ -61,6 +61,8 @@ class StatisticsChart extends LitElement {
@property() public chartType: ChartType = "line"; @property() public chartType: ChartType = "line";
@property({ type: Boolean }) public hideLegend = false;
@property({ type: Boolean }) public isLoadingData = false; @property({ type: Boolean }) public isLoadingData = false;
@state() private _chartData: ChartData = { datasets: [] }; @state() private _chartData: ChartData = { datasets: [] };
@ -175,7 +177,7 @@ class StatisticsChart extends LitElement {
propagate: true, propagate: true,
}, },
legend: { legend: {
display: true, display: !this.hideLegend,
labels: { labels: {
usePointStyle: true, usePointStyle: true,
}, },
@ -339,7 +341,7 @@ class StatisticsChart extends LitElement {
? "-1" ? "-1"
: false : false
: false, : false,
borderColor: band ? color + "7F" : color, borderColor: band ? color + (this.hideLegend ? "00" : "7F") : color,
backgroundColor: band ? color + "3F" : color + "7F", backgroundColor: band ? color + "3F" : color + "7F",
pointRadius: 0, pointRadius: 0,
data: [], data: [],

View File

@ -315,7 +315,7 @@ export class MoreInfoDialog extends LitElement {
cursor: default; cursor: default;
} }
:host([tab="info"][large]) ha-dialog { :host([large]) ha-dialog {
--mdc-dialog-min-width: 90vw; --mdc-dialog-min-width: 90vw;
--mdc-dialog-max-width: 90vw; --mdc-dialog-max-width: 90vw;
} }

View File

@ -65,6 +65,7 @@ export class MoreInfoHistory extends LitElement {
.statisticsData=${this._statistics} .statisticsData=${this._statistics}
.statTypes=${statTypes} .statTypes=${statTypes}
.names=${this._statNames} .names=${this._statNames}
hideLegend
></statistics-chart>` ></statistics-chart>`
: html`<state-history-charts : html`<state-history-charts
up-to-now up-to-now

View File

@ -206,7 +206,9 @@ class HaConfigSystemNavigation extends LitElement {
const hardwareInfo: HardwareInfo = await this.hass.callWS({ const hardwareInfo: HardwareInfo = await this.hass.callWS({
type: "hardware/info", type: "hardware/info",
}); });
this._boardName = hardwareInfo?.hardware?.[0]?.name; this._boardName = hardwareInfo?.hardware.find(
(hw) => hw.board !== null
)?.name;
} else if (isHassioLoaded) { } else if (isHassioLoaded) {
const osData: HassioHassOSInfo = await fetchHassioHassOsInfo(this.hass); const osData: HassioHassOSInfo = await fetchHassioHassOsInfo(this.hass);
if (osData.board) { if (osData.board) {

View File

@ -176,9 +176,11 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
let imageURL: string | undefined; let imageURL: string | undefined;
let documentationURL: string | undefined; let documentationURL: string | undefined;
if (this._hardwareInfo?.hardware.length) { const boardData = this._hardwareInfo?.hardware.find(
const boardData = this._hardwareInfo.hardware[0]; (hw) => hw.board !== null
);
if (boardData) {
boardId = boardData.board.hassio_board_id; boardId = boardData.board.hassio_board_id;
boardName = boardData.name; boardName = boardData.name;
documentationURL = boardData.url; documentationURL = boardData.url;

View File

@ -490,7 +490,7 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
([domain, items]) => ([domain, items]) =>
html`<ha-integration-card html`<ha-integration-card
data-domain=${domain} data-domain=${domain}
disabled entryDisabled
.hass=${this.hass} .hass=${this.hass}
.domain=${domain} .domain=${domain}
.items=${items} .items=${items}

View File

@ -90,7 +90,7 @@ export class HaIntegrationCard extends LitElement {
@property() public selectedConfigEntryId?: string; @property() public selectedConfigEntryId?: string;
@property({ type: Boolean }) public disabled = false; @property({ type: Boolean }) public entryDisabled = false;
@property({ type: Boolean }) public supportsDiagnostics = false; @property({ type: Boolean }) public supportsDiagnostics = false;
@ -114,7 +114,7 @@ export class HaIntegrationCard extends LitElement {
single: hasItem, single: hasItem,
group: !hasItem, group: !hasItem,
hasMultiple: this.items.length > 1, hasMultiple: this.items.length > 1,
disabled: this.disabled, disabled: this.entryDisabled,
"state-not-loaded": hasItem && item!.state === "not_loaded", "state-not-loaded": hasItem && item!.state === "not_loaded",
"state-failed-unload": hasItem && item!.state === "failed_unload", "state-failed-unload": hasItem && item!.state === "failed_unload",
"state-setup": hasItem && item!.state === "setup_in_progress", "state-setup": hasItem && item!.state === "setup_in_progress",
@ -124,7 +124,7 @@ export class HaIntegrationCard extends LitElement {
> >
<ha-integration-header <ha-integration-header
.hass=${this.hass} .hass=${this.hass}
.banner=${this.disabled .banner=${this.entryDisabled
? this.hass.localize( ? this.hass.localize(
"ui.panel.config.integrations.config_entry.disable.disabled" "ui.panel.config.integrations.config_entry.disable.disabled"
) )

View File

@ -129,8 +129,10 @@ 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, 12px);
border-top-right-radius: var(--ha-card-border-radius, 12px); /* Padding is subtracted for nested elements with border radiuses */
border-top-left-radius: calc(var(--ha-card-border-radius, 12px) - 2px);
border-top-right-radius: calc(var(--ha-card-border-radius, 12px) - 2px);
} }
.header { .header {
display: flex; display: flex;

View File

@ -149,7 +149,7 @@ class HUIRoot extends LitElement {
@click=${this._editModeDisable} @click=${this._editModeDisable}
></mwc-button> ></mwc-button>
<a <a
href=${documentationUrl(this.hass, "/lovelace/")} href=${documentationUrl(this.hass, "/dashboards/")}
rel="noreferrer" rel="noreferrer"
class="menu-link" class="menu-link"
target="_blank" target="_blank"