Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
49 changes: 31 additions & 18 deletions hassio/src/addon-view/config/hassio-addon-config-tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,41 @@ class HassioAddonConfigDashboard extends LitElement {
if (!this.addon) {
return html`<ha-circular-progress active></ha-circular-progress>`;
}
const hasOptions =
this.addon.options && Object.keys(this.addon.options).length;
const hasSchema =
this.addon.schema && Object.keys(this.addon.schema).length;

return html`
<div class="content">
<hassio-addon-config
.hass=${this.hass}
.addon=${this.addon}
></hassio-addon-config>
${this.addon.network
? html`
<hassio-addon-network
.hass=${this.hass}
.addon=${this.addon}
></hassio-addon-network>
`
: ""}
${this.addon.audio
${hasOptions || hasSchema || this.addon.network || this.addon.audio
? html`
<hassio-addon-audio
.hass=${this.hass}
.addon=${this.addon}
></hassio-addon-audio>
${hasOptions || hasSchema
? html`
<hassio-addon-config
.hass=${this.hass}
.addon=${this.addon}
></hassio-addon-config>
`
: ""}
${this.addon.network
? html`
<hassio-addon-network
.hass=${this.hass}
.addon=${this.addon}
></hassio-addon-network>
`
: ""}
${this.addon.audio
? html`
<hassio-addon-audio
.hass=${this.hass}
.addon=${this.addon}
></hassio-addon-audio>
`
: ""}
`
: ""}
: "This add-on does not expose configuration for you to mess with.... 👋"}
</div>
`;
}
Expand Down
1 change: 1 addition & 0 deletions src/data/hassio/addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface HassioAddonDetails extends HassioAddonInfo {
privileged: any;
protected: boolean;
rating: "1-6";
schema: Record<string, any>;
services_role: string[];
slug: string;
startup: "initialize" | "system" | "services" | "application" | "once";
Expand Down