mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Guard more of the hardware panel (#13650)
This commit is contained in:
parent
c5428d8581
commit
5e431a07ad
@ -80,7 +80,8 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
private _cpuEntries: { x: number; y: number | null }[] = [];
|
||||
|
||||
public hassSubscribe() {
|
||||
return [
|
||||
return isComponentLoaded(this.hass, "hardware")
|
||||
? [
|
||||
this.hass.connection.subscribeMessage<SystemStatusStreamMessage>(
|
||||
(message) => {
|
||||
// Only store the last 60 entries
|
||||
@ -102,7 +103,8 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
type: "hardware/subscribe_system_status",
|
||||
}
|
||||
),
|
||||
];
|
||||
]
|
||||
: [];
|
||||
}
|
||||
|
||||
protected willUpdate(): void {
|
||||
@ -198,7 +200,8 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.header=${this.hass.localize("ui.panel.config.hardware.caption")}
|
||||
>
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
${isComponentLoaded(this.hass, "hassio")
|
||||
? html`<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
@ -223,7 +226,8 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
>
|
||||
`
|
||||
: ""}
|
||||
</ha-button-menu>
|
||||
</ha-button-menu>`
|
||||
: ""}
|
||||
${this._error
|
||||
? html`
|
||||
<ha-alert alert-type="error"
|
||||
|
Loading…
x
Reference in New Issue
Block a user