mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 02:06:42 +00:00
Allow edit default config (#3220)
This commit is contained in:
parent
1ad9d2e54c
commit
f019bb095d
@ -33,8 +33,10 @@ class ConfigCoreForm extends LitElement {
|
||||
@property() private _timeZone!: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
const isStorage = this.hass.config.config_source === "storage";
|
||||
const disabled = this._working || !isStorage;
|
||||
const canEdit = ["storage", "default"].includes(
|
||||
this.hass.config.config_source
|
||||
);
|
||||
const disabled = this._working || !canEdit;
|
||||
|
||||
return html`
|
||||
<ha-card
|
||||
@ -43,7 +45,7 @@ class ConfigCoreForm extends LitElement {
|
||||
)}
|
||||
>
|
||||
<div class="card-content">
|
||||
${!isStorage
|
||||
${!canEdit
|
||||
? html`
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
|
@ -25,13 +25,15 @@ class ConfigNameForm extends LitElement {
|
||||
@property() private _name!: ConfigUpdateValues["location_name"];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
const isStorage = this.hass.config.config_source === "storage";
|
||||
const disabled = this._working || !isStorage;
|
||||
const canEdit = ["storage", "default"].includes(
|
||||
this.hass.config.config_source
|
||||
);
|
||||
const disabled = this._working || !canEdit;
|
||||
|
||||
return html`
|
||||
<ha-card>
|
||||
<div class="card-content">
|
||||
${!isStorage
|
||||
${!canEdit
|
||||
? html`
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
|
Loading…
x
Reference in New Issue
Block a user