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(
info.items[0]
)}
?disabled=${info.disabled}
?entryDisabled=${info.disabled}
.selectedConfigEntryId=${info.highlight}
></ha-integration-card>
`

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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