mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Hide rpi_power entry during onboarding (#7001)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
50e03d41ab
commit
6b77f08d86
@ -29,6 +29,8 @@ import { HomeAssistant } from "../types";
|
|||||||
import "./action-badge";
|
import "./action-badge";
|
||||||
import "./integration-badge";
|
import "./integration-badge";
|
||||||
|
|
||||||
|
const HIDDEN_DOMAINS = new Set(["met", "rpi_power"]);
|
||||||
|
|
||||||
@customElement("onboarding-integrations")
|
@customElement("onboarding-integrations")
|
||||||
class OnboardingIntegrations extends LitElement {
|
class OnboardingIntegrations extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
@ -161,10 +163,12 @@ class OnboardingIntegrations extends LitElement {
|
|||||||
|
|
||||||
private async _loadConfigEntries() {
|
private async _loadConfigEntries() {
|
||||||
const entries = await getConfigEntries(this.hass!);
|
const entries = await getConfigEntries(this.hass!);
|
||||||
// We filter out the config entry for the local weather.
|
// We filter out the config entry for the local weather and rpi_power.
|
||||||
// It is one that we create automatically and it will confuse the user
|
// It is one that we create automatically and it will confuse the user
|
||||||
// if it starts showing up during onboarding.
|
// if it starts showing up during onboarding.
|
||||||
this._entries = entries.filter((entry) => entry.domain !== "met");
|
this._entries = entries.filter(
|
||||||
|
(entry) => !HIDDEN_DOMAINS.has(entry.domain)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _finish() {
|
private async _finish() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user