Change message to info alert (#9930)

This commit is contained in:
Bram Kragten 2021-09-02 00:40:51 +02:00 committed by GitHub
parent 0cbac8bb44
commit 1692f9c2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import {
mdiAlertOutline, mdiAlertOutline,
mdiCheckboxMarkedCircleOutline, mdiCheckboxMarkedCircleOutline,
mdiClose, mdiClose,
mdiInformationOutline,
} from "@mdi/js"; } from "@mdi/js";
import { css, html, LitElement } from "lit"; import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators"; import { customElement, property } from "lit/decorators";
@ -13,7 +14,7 @@ import { fireEvent } from "../common/dom/fire_event";
import "./ha-svg-icon"; import "./ha-svg-icon";
const ALERT_ICONS = { const ALERT_ICONS = {
info: mdiAlertCircleOutline, info: mdiInformationOutline,
warning: mdiAlertOutline, warning: mdiAlertOutline,
error: mdiAlertCircleOutline, error: mdiAlertCircleOutline,
success: mdiCheckboxMarkedCircleOutline, success: mdiCheckboxMarkedCircleOutline,

View File

@ -13,6 +13,7 @@ import "../../../layouts/hass-loading-screen";
import "../../../layouts/hass-tabs-subpage"; import "../../../layouts/hass-tabs-subpage";
import { haStyle } from "../../../resources/styles"; import { haStyle } from "../../../resources/styles";
import type { HomeAssistant, Route } from "../../../types"; import type { HomeAssistant, Route } from "../../../types";
import "../../../components/ha-alert";
import { configSections } from "../ha-panel-config"; import { configSections } from "../ha-panel-config";
import "./components/ha-energy-device-settings"; import "./components/ha-energy-device-settings";
import "./components/ha-energy-grid-settings"; import "./components/ha-energy-grid-settings";
@ -77,12 +78,10 @@ class HaConfigEnergy extends LitElement {
.route=${this.route} .route=${this.route}
.tabs=${configSections.experiences} .tabs=${configSections.experiences}
> >
<ha-card> <ha-alert>
<div class="card-content"> After setting up a new device, it can take up to 2 hours for new data
After setting up a new device, it can take up to 2 hours for new to arrive in your energy dashboard.
data to arrive in your energy dashboard. </ha-alert>
</div>
</ha-card>
<div class="container"> <div class="container">
<ha-energy-grid-settings <ha-energy-grid-settings
.hass=${this.hass} .hass=${this.hass}
@ -156,7 +155,8 @@ class HaConfigEnergy extends LitElement {
return [ return [
haStyle, haStyle,
css` css`
ha-card { ha-alert {
display: block;
margin: 8px; margin: 8px;
} }
.container { .container {