Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ca1dacd
Update to actually set loading
zsarnett Sep 18, 2020
672b867
[ci skip] Translation update
homeassistant Sep 19, 2020
229ba3a
[ci skip] Translation update
homeassistant Sep 20, 2020
d538b61
Media Player Browser: Fix child names add tooltip (#7020)
zsarnett Sep 20, 2020
e6357e2
[ci skip] Translation update
homeassistant Sep 21, 2020
4b84696
Adopt --code-font-family (#6997)
KTibow Sep 21, 2020
f80bea2
Fix outline on mouseover in firefox (#7052)
thomasloven Sep 21, 2020
b4d34d9
Add Hours to show to the cache key (#7072)
zsarnett Sep 21, 2020
24b390b
Add actions to entities config struct (#7063)
zsarnett Sep 21, 2020
76db64c
Fix Calendar Title from not removing (#7058)
zsarnett Sep 21, 2020
6013394
Fix for NOT IN / IN Operators (#7061)
b3nj1 Sep 21, 2020
0fb3814
fix media icon diff (#7071)
zsarnett Sep 21, 2020
106f18a
Update Material Design Icons to v5.6.55 (#7081)
Sep 21, 2020
ad64657
[ci skip] Translation update
homeassistant Sep 22, 2020
25a2264
Use absolute URL for background image in media-control card (#7100)
thomasloven Sep 22, 2020
b9c41d8
Optimize images (#7091)
andrewrabert Sep 22, 2020
e7e7912
Fix wait for trigger (#7089)
bramkragten Sep 22, 2020
6d5c6e2
Show message when there are no add-ons (#7101)
ludeeus Sep 22, 2020
0304c0e
Fix sensor card from not working with detail (#7060)
zsarnett Sep 22, 2020
bd51188
Adds hassio-system-metrics (#7105)
ludeeus Sep 22, 2020
0894a30
[ci skip] Translation update
homeassistant Sep 23, 2020
b7d8ff6
Corrected password changed message in User panel (#7111)
bcrowie Sep 23, 2020
8668f0f
Progress circle when loading data (#7059)
zsarnett Sep 23, 2020
dde4a40
[ci skip] Translation update
homeassistant Sep 24, 2020
c39c408
cloud-webhooks cleanup (#7118)
ludeeus Sep 24, 2020
bbee94e
Prevent deletion of the owner user (#7116)
ludeeus Sep 24, 2020
f822fa0
Added icon for timestamp device class (#7117)
chemelli74 Sep 24, 2020
b2e2dbe
Merge ha-paper-slider into ha-slider (#7114)
thomasloven Sep 24, 2020
dac6ede
Humidifier icon for off state (#7113)
Shulyaka Sep 24, 2020
4ba6698
Support twice daily forecasts in weather-forecast-card (#6065)
rajlaud Sep 24, 2020
245c825
Add humidifier entity row (#6213)
Shulyaka Sep 24, 2020
a349e34
Card Editor: Special Row doesn't show warning (#7093)
zsarnett Sep 24, 2020
98dd21b
Revert lazy loading more info controls (#7123)
bramkragten Sep 24, 2020
003d559
Added icon for power on/off (#7124)
chemelli74 Sep 24, 2020
ea9f227
[ci skip] Translation update
homeassistant Sep 25, 2020
28050fc
Add upload snapshot dialog (#7115)
ludeeus Sep 25, 2020
9cf9e6e
Allow initial View in Calendar Card (#6982)
zsarnett Sep 25, 2020
412a5a6
[ci skip] Translation update
homeassistant Sep 26, 2020
da0658f
[ci skip] Translation update
homeassistant Sep 27, 2020
d9f4271
[ci skip] Translation update
homeassistant Sep 28, 2020
e9141d8
Calendar Card: Initial View Editor (#7135)
zsarnett Sep 28, 2020
dfb2a71
Add weekday to time contidion editor (#6848)
Misiu Sep 28, 2020
458ab9b
Add --ha-card-border-width (#7021)
KTibow Sep 28, 2020
4759c89
Bring back lazy load more info + helper (#7131)
bramkragten Sep 28, 2020
50e03d4
Add timeout to dev template renders (#7141)
bdraco Sep 28, 2020
6b77f08
Hide rpi_power entry during onboarding (#7001)
MartinHjelmare Sep 28, 2020
9dabce1
[ci skip] Translation update
homeassistant Sep 29, 2020
c445d4b
Update supported browsers for Cast
balloob Sep 29, 2020
51953bc
Change "persons" to "people" (#7037)
sampl Sep 29, 2020
f48a282
More-Info Dialog Logbook Bug Fix (#7152)
Brahmah Sep 29, 2020
590cd85
Restore snapshot from onboarding (#7132)
ludeeus Sep 29, 2020
2f21f6e
Add unit_of_measurement to input-number-entity-row (#6965)
ludeeus Sep 29, 2020
a214ab4
Add last_updated tooltip to more info dialog (#6926)
pszafer Sep 29, 2020
7d1f9f3
Add LocalizeMixin to state-info
bramkragten Sep 29, 2020
9ac777d
Add default to action editor (#7006)
zsarnett Sep 29, 2020
10d7158
[ci skip] Translation update
homeassistant Sep 30, 2020
4f5b4d4
Calendar Card: Fix Calendar not updating events on config change (#7165)
zsarnett Sep 30, 2020
d0c86ea
Use ieee for zha.remove service data (#7163)
Adminiuga Sep 30, 2020
2616281
Expand error msg on why yaml defined entities can't be changed from U…
mrand Sep 30, 2020
e2427c8
Logbook: Localize Message & Style updates (#6978)
zsarnett Sep 30, 2020
d2e9e22
Add media player to cast app (#7160)
bramkragten Sep 30, 2020
2eb7132
Merge branch 'master' into dev
bramkragten Sep 30, 2020
0456669
Bumped version to 20200930.0
bramkragten Sep 30, 2020
4f2bad0
Fix safari issues and move scrollable to own container (#7029)
bramkragten Sep 30, 2020
771c751
Custom Lovelace View Layouts (#6557)
zsarnett Sep 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified cast/public/images/favicon.ico
Binary file not shown.
Binary file modified cast/public/images/google-nest-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cast/public/images/ha-cast-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions cast/src/html/launcher-faq.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,8 @@
Chromecast is a technology developed by Google, and is available on:
</p>
<ul>
<li>Google Chrome (all platforms except on iOS)</li>
<li>
Microsoft Edge (all platforms,
<a href="https://www.microsoftedgeinsider.com" target="_blank"
>dev and canary builds only</a
>)
</li>
<li>Google Chrome (all platforms except iOS)</li>
<li>Microsoft Edge (all platforms)</li>
</ul>
</div>

Expand Down
101 changes: 97 additions & 4 deletions cast/src/receiver/entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,58 @@ import { castContext } from "./cast_context";
import { HcMain } from "./layout/hc-main";
import { ReceivedMessage } from "./types";

const controller = new HcMain();
document.body.append(controller);
const lovelaceController = new HcMain();
document.body.append(lovelaceController);

const mediaPlayer = document.createElement("cast-media-player");
mediaPlayer.style.display = "none";
document.body.append(mediaPlayer);
const playerStylesAdded = false;

let controls: HTMLElement | null;

const setTouchControlsVisibility = (visible: boolean) => {
if (!castContext.getDeviceCapabilities().touch_input_supported) {
return;
}
controls =
controls ||
(document.body.querySelector("touch-controls") as HTMLElement | null);
if (controls) {
controls.style.display = visible ? "initial" : "none";
}
};

const showLovelaceController = () => {
mediaPlayer.style.display = "none";
lovelaceController.style.display = "initial";
document.body.setAttribute("style", "overflow-y: auto !important");
setTouchControlsVisibility(false);
};

const showMediaPlayer = () => {
lovelaceController.style.display = "none";
mediaPlayer.style.display = "initial";
document.body.removeAttribute("style");
setTouchControlsVisibility(true);
if (!playerStylesAdded) {
const style = document.createElement("style");
style.innerHTML = `
body {
--logo-image: url('https://www.home-assistant.io/images/home-assistant-logo.svg');
--theme-hue: 200;
--progress-color: #03a9f4;
--splash-image: url('https://home-assistant.io/images/cast/splash.png');
--splash-size: cover;
}
`;
document.head.appendChild(style);
}
};

const options = new cast.framework.CastReceiverOptions();
options.disableIdleTimeout = true;
options.customNamespaces = {
// @ts-ignore
[CAST_NS]: cast.framework.system.MessageType.JSON,
};

Expand All @@ -30,13 +75,61 @@ options.uiConfig = new cast.framework.ui.UiConfig();
// @ts-ignore
options.uiConfig.touchScreenOptimizedApp = true;

castContext.setInactivityTimeout(86400); // 1 day

castContext.addCustomMessageListener(
CAST_NS,
// @ts-ignore
(ev: ReceivedMessage<HassMessage>) => {
// We received a show Lovelace command, stop media from playing, hide media player and show Lovelace controller
if (
playerManager.getPlayerState() !==
cast.framework.messages.PlayerState.IDLE
) {
playerManager.stop();
} else {
showLovelaceController();
}
const msg = ev.data;
msg.senderId = ev.senderId;
controller.processIncomingMessage(msg);
lovelaceController.processIncomingMessage(msg);
}
);

const playerManager = castContext.getPlayerManager();

playerManager.setMessageInterceptor(
cast.framework.messages.MessageType.LOAD,
(loadRequestData) => {
// We received a play media command, hide Lovelace and show media player
showMediaPlayer();
const media = loadRequestData.media;
// Special handling if it came from Google Assistant
if (media.entity) {
media.contentId = media.entity;
media.streamType = cast.framework.messages.StreamType.LIVE;
media.contentType = "application/vnd.apple.mpegurl";
// @ts-ignore
media.hlsVideoSegmentFormat =
cast.framework.messages.HlsVideoSegmentFormat.FMP4;
}
return loadRequestData;
}
);

playerManager.addEventListener(
cast.framework.events.EventType.MEDIA_STATUS,
(event) => {
if (
event.mediaStatus?.playerState ===
cast.framework.messages.PlayerState.IDLE &&
event.mediaStatus?.idleReason &&
event.mediaStatus?.idleReason !==
cast.framework.messages.IdleReason.INTERRUPTED
) {
// media finished or stopped, return to default Lovelace
showLovelaceController();
}
}
);

Expand Down
25 changes: 8 additions & 17 deletions cast/src/receiver/layout/hc-lovelace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from "lit-element";
import { LovelaceConfig } from "../../../../src/data/lovelace";
import { Lovelace } from "../../../../src/panels/lovelace/types";
import "../../../../src/panels/lovelace/views/hui-panel-view";
import "../../../../src/panels/lovelace/views/hui-view";
import { HomeAssistant } from "../../../../src/types";
import "./hc-launch-screen";
Expand Down Expand Up @@ -45,22 +44,14 @@ class HcLovelace extends LitElement {
deleteConfig: async () => undefined,
setEditMode: () => undefined,
};
return this.lovelaceConfig.views[index].panel
? html`
<hui-panel-view
.hass=${this.hass}
.lovelace=${lovelace}
.config=${this.lovelaceConfig.views[index]}
></hui-panel-view>
`
: html`
<hui-view
.hass=${this.hass}
.lovelace=${lovelace}
.index=${index}
columns="2"
></hui-view>
`;
return html`
<hui-view
.hass=${this.hass}
.lovelace=${lovelace}
.index=${index}
columns="2"
></hui-view>
`;
}

protected updated(changedProps) {
Expand Down
15 changes: 1 addition & 14 deletions cast/src/receiver/layout/hc-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ export class HcMain extends HassElement {
}
this._showDemo = false;
this._lovelacePath = msg.viewPath;
if (castContext.getDeviceCapabilities().touch_input_supported) {
this._breakFree();
}

this._sendStatus();
}

Expand All @@ -241,9 +239,6 @@ export class HcMain extends HassElement {
this._showDemo = true;
this._lovelacePath = "overview";
this._sendStatus();
if (castContext.getDeviceCapabilities().touch_input_supported) {
this._breakFree();
}
});
}

Expand All @@ -264,14 +259,6 @@ export class HcMain extends HassElement {
}
}

private _breakFree() {
const controls = document.body.querySelector("touch-controls");
if (controls) {
controls.remove();
}
document.body.setAttribute("style", "overflow-y: auto !important");
}

private sendMessage(senderId: string, response: any) {
castContext.sendCustomMessage(CAST_NS, senderId, response);
}
Expand Down
Binary file modified demo/public/assets/arsaboo/floorplans/ecobee_blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/floorplans/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/floorplans/second.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/Harmony.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/abode_disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/abode_enabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/automation_disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/automation_enabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_backyard_recording.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_backyard_streaming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_driveway_recording.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_driveway_streaming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_patio_recording.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_patio_streaming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_porch_recording.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/camera_porch_streaming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/ecobee_blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/garage_door_closed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/garage_door_open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/light_bulb_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/light_bulb_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/light_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/light_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/public/assets/arsaboo/icons/security_armed_red.png
Binary file modified demo/public/assets/arsaboo/icons/security_disarmed.png
Binary file modified demo/public/assets/arsaboo/icons/tv_disabled.png
Binary file modified demo/public/assets/arsaboo/icons/tv_enabled.png
Binary file modified demo/public/assets/arsaboo/icons/tv_off2.png
Binary file modified demo/public/assets/arsaboo/icons/tv_on2.png
Binary file modified demo/public/assets/arsaboo/images/camera.backyard.jpg
Binary file modified demo/public/assets/arsaboo/images/camera.driveway.jpg
Binary file modified demo/public/assets/arsaboo/images/camera.patio.jpg
Binary file modified demo/public/assets/arsaboo/images/camera.porch.jpg
Binary file modified demo/public/assets/jimpower/cardbackK.png
Binary file modified demo/public/assets/jimpower/home/bus_10.jpg
Binary file modified demo/public/assets/jimpower/home/git.png
Binary file modified demo/public/assets/jimpower/home/house_4.png
Binary file modified demo/public/assets/jimpower/home/james_10.jpg
Binary file modified demo/public/assets/jimpower/home/tina_4.jpg
Binary file modified demo/public/assets/jimpower/security/door_3.png
Binary file modified demo/public/assets/jimpower/security/leak_2.png
Binary file modified demo/public/assets/jimpower/security/motion_3.jpg
Binary file modified demo/public/assets/kernehed/bella.jpg
Binary file modified demo/public/assets/kernehed/camera.entre.jpg
Binary file modified demo/public/assets/kernehed/oscar.jpg
Binary file modified demo/public/assets/teachingbirds/Stefan_square.jpg
Binary file modified demo/public/assets/teachingbirds/background_square.png
Binary file modified demo/public/assets/teachingbirds/meteogram.png
Binary file modified demo/public/assets/teachingbirds/plants.png
Binary file modified demo/public/assets/teachingbirds/radiator_off.jpg
Binary file modified demo/public/assets/teachingbirds/radiator_on.jpg
Binary file modified demo/public/stub_config/bedroom.png
Binary file modified demo/public/stub_config/floorplan.png
Binary file modified gallery/public/api/media_player_proxy/media_player.living_room
Binary file not shown.
Binary file modified gallery/public/images/bed.png
2 changes: 1 addition & 1 deletion gallery/src/components/more-info-content.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HassEntity } from "home-assistant-js-websocket";
import { property, PropertyValues, UpdatingElement } from "lit-element";
import dynamicContentUpdater from "../../../src/common/dom/dynamic_content_updater";
import { stateMoreInfoType } from "../../../src/common/entity/state_more_info_type";
import { stateMoreInfoType } from "../../../src/dialogs/more-info/state_more_info_control";
import "../../../src/dialogs/more-info/controls/more-info-alarm_control_panel";
import "../../../src/dialogs/more-info/controls/more-info-automation";
import "../../../src/dialogs/more-info/controls/more-info-camera";
Expand Down
2 changes: 1 addition & 1 deletion hassio/src/addon-view/config/hassio-addon-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class HassioAddonConfig extends LitElement {
}
iron-autogrow-textarea {
width: 100%;
font-family: monospace;
font-family: var(--code-font-family, monospace);
}
.syntaxerror {
color: var(--error-color);
Expand Down
81 changes: 81 additions & 0 deletions hassio/src/components/hassio-upload-snapshot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import "../../../src/components/ha-file-upload";
import "@material/mwc-icon-button/mwc-icon-button";
import { mdiFolderUpload } from "@mdi/js";
import "@polymer/iron-input/iron-input";
import "@polymer/paper-input/paper-input-container";
import {
customElement,
html,
internalProperty,
LitElement,
TemplateResult,
} from "lit-element";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/components/ha-circular-progress";
import "../../../src/components/ha-svg-icon";
import {
HassioSnapshot,
uploadSnapshot,
} from "../../../src/data/hassio/snapshot";
import { HomeAssistant } from "../../../src/types";
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";

declare global {
interface HASSDomEvents {
"snapshot-uploaded": { snapshot: HassioSnapshot };
}
}

@customElement("hassio-upload-snapshot")
export class HassioUploadSnapshot extends LitElement {
public hass!: HomeAssistant;

@internalProperty() public value: string | null = null;

@internalProperty() private _uploading = false;

public render(): TemplateResult {
return html`
<ha-file-upload
.uploading=${this._uploading}
.icon=${mdiFolderUpload}
accept="application/x-tar"
label="Upload snapshot"
@file-picked=${this._uploadFile}
auto-open-file-dialog
></ha-file-upload>
`;
}

private async _uploadFile(ev) {
const file = ev.detail.files[0];

if (!["application/x-tar"].includes(file.type)) {
showAlertDialog(this, {
title: "Unsupported file format",
text: "Please choose a Home Assistant snapshot file (.tar)",
confirmText: "ok",
});
return;
}
this._uploading = true;
try {
const snapshot = await uploadSnapshot(this.hass, file);
fireEvent(this, "snapshot-uploaded", { snapshot: snapshot.data });
} catch (err) {
showAlertDialog(this, {
title: "Upload failed",
text: err.toString(),
confirmText: "ok",
});
} finally {
this._uploading = false;
}
}
}

declare global {
interface HTMLElementTagNameMap {
"hassio-upload-snapshot": HassioUploadSnapshot;
}
}
11 changes: 7 additions & 4 deletions hassio/src/dashboard/hassio-addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "lit-element";
import { atLeastVersion } from "../../../src/common/config/version";
import { navigate } from "../../../src/common/navigate";
import { compare } from "../../../src/common/string/compare";
import "../../../src/components/ha-card";
import { HassioAddonInfo } from "../../../src/data/hassio/addon";
import { haStyle } from "../../../src/resources/styles";
Expand All @@ -21,25 +22,27 @@ import { hassioStyle } from "../resources/hassio-style";
class HassioAddons extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;

@property() public addons?: HassioAddonInfo[];
@property({ attribute: false }) public addons?: HassioAddonInfo[];

protected render(): TemplateResult {
return html`
<div class="content">
<h1>Add-ons</h1>
<div class="card-group">
${!this.addons
${!this.addons?.length
? html`
<ha-card>
<div class="card-content">
You don't have any add-ons installed yet. Head over to
<a href="#" @click=${this._openStore}>the add-on store</a>
<button class="link" @click=${this._openStore}>
the add-on store
</button>
to get started!
</div>
</ha-card>
`
: this.addons
.sort((a, b) => (a.name > b.name ? 1 : -1))
.sort((a, b) => compare(a.name, b.name))
.map(
(addon) => html`
<ha-card .addon=${addon} @click=${this._addonTapped}>
Expand Down
Loading