mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Add reload for platforms with reload service (#6851)
This commit is contained in:
parent
100ba8edfa
commit
6e0e169b6e
@ -23,6 +23,8 @@ import { HomeAssistant, Route } from "../../../types";
|
||||
import "../ha-config-section";
|
||||
import { configSections } from "../ha-panel-config";
|
||||
|
||||
const platformsWithReload = ["template"];
|
||||
|
||||
@customElement("ha-config-server-control")
|
||||
export class HaConfigServerControl extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
@ -49,11 +51,13 @@ export class HaConfigServerControl extends LitElement {
|
||||
changedProperties.has("hass") &&
|
||||
(!oldHass || oldHass.config.components !== this.hass.config.components)
|
||||
) {
|
||||
this._reloadableDomains = this.hass.config.components.filter(
|
||||
(component) =>
|
||||
!component.includes(".") &&
|
||||
isServiceLoaded(this.hass, component, "reload")
|
||||
);
|
||||
this._reloadableDomains = this.hass.config.components
|
||||
.concat(platformsWithReload)
|
||||
.filter(
|
||||
(component) =>
|
||||
!component.includes(".") &&
|
||||
isServiceLoaded(this.hass, component, "reload")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user