mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Haos update button (#7419)
This commit is contained in:
parent
30f34eee22
commit
682fa0d3eb
@ -29,7 +29,7 @@ class HassioPanelRouter extends HassRouterPage {
|
||||
|
||||
@property({ attribute: false }) public hassioInfo!: HassioInfo;
|
||||
|
||||
@property({ attribute: false }) public hostInfo: HassioHostInfo;
|
||||
@property({ attribute: false }) public hostInfo?: HassioHostInfo;
|
||||
|
||||
@property({ attribute: false }) public hassInfo?: HassioHomeAssistantInfo;
|
||||
|
||||
|
@ -68,7 +68,7 @@ class HassioRouter extends HassRouterPage {
|
||||
|
||||
@internalProperty() private _supervisorInfo?: HassioSupervisorInfo;
|
||||
|
||||
@internalProperty() private _hostInfo: HassioHostInfo;
|
||||
@internalProperty() private _hostInfo?: HassioHostInfo;
|
||||
|
||||
@internalProperty() private _hassioInfo?: HassioInfo;
|
||||
|
||||
|
@ -109,7 +109,7 @@ class HassioHostInfo extends LitElement {
|
||||
${this.hostInfo.operating_system}
|
||||
</span>
|
||||
${this.hostInfo.features.includes("hassos") &&
|
||||
this.hostInfo.update_available
|
||||
this.hassOsInfo.update_available
|
||||
? html`
|
||||
<ha-progress-button
|
||||
title="Update the host OS"
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||
import "../../../src/components/buttons/ha-progress-button";
|
||||
import "../../../src/components/ha-card";
|
||||
import "../../../src/components/ha-settings-row";
|
||||
@ -206,7 +207,7 @@ class HassioSupervisorInfo extends LitElement {
|
||||
};
|
||||
await setSupervisorOption(this.hass, data);
|
||||
await reloadSupervisor(this.hass);
|
||||
this.supervisorInfo = await fetchHassioSupervisorInfo(this.hass);
|
||||
fireEvent(this, "hass-api-called", { success: true, response: null });
|
||||
} catch (err) {
|
||||
showAlertDialog(this, {
|
||||
title: "Failed to set supervisor option",
|
||||
|
@ -1,13 +1,23 @@
|
||||
import { HomeAssistant } from "../../types";
|
||||
import { hassioApiResultExtractor, HassioResponse } from "./common";
|
||||
|
||||
export type HassioHostInfo = any;
|
||||
export type HassioHostInfo = {
|
||||
chassis: string;
|
||||
cpe: string;
|
||||
deployment: string;
|
||||
disk_free: number;
|
||||
disk_total: number;
|
||||
disk_used: number;
|
||||
features: string[];
|
||||
hostname: string;
|
||||
kernel: string;
|
||||
operating_system: string;
|
||||
};
|
||||
|
||||
export interface HassioHassOSInfo {
|
||||
board: "ova" | "rpi";
|
||||
board: string;
|
||||
boot: string;
|
||||
update_available: boolean;
|
||||
version_cli_latest: string;
|
||||
version_cli: string;
|
||||
version_latest: string;
|
||||
version: string;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user