mirror of
https://github.com/junkfix/config-editor-card.git
synced 2026-02-22 18:26:31 +01:00
Merge pull request #54 from htmltiger/htmltiger-patch-1
missing config error fix
This commit is contained in:
commit
7e3f998fff
|
|
@ -1,4 +1,4 @@
|
|||
console.info("Config Editor 4.6");
|
||||
console.info("Config Editor 4.7");
|
||||
const LitElement = window.LitElement || Object.getPrototypeOf(customElements.get("hui-masonry-view") );
|
||||
const html = LitElement.prototype.html;
|
||||
const css = LitElement.prototype.css;
|
||||
|
|
@ -75,7 +75,7 @@ render(){
|
|||
const targetver=4;
|
||||
const hver=this._hass ? this._hass.states['config_editor.version']:{state:0};
|
||||
const dlink=html`<a href="https://github.com/htmltiger/config-editor">download</a>`;
|
||||
if(!hver.state){return html`<ha-card>Missing 'config_editor:' in configuration.yaml ${dlink}</ha-card>`;}
|
||||
if(!hver || !hver.state){return html`<ha-card>Missing 'config_editor:' in configuration.yaml ${dlink}</ha-card>`;}
|
||||
if(hver.state != targetver){return html`<ha-card>Please ${dlink} upgrade from ${hver.state} to ${targetver}</ha-card>`;}
|
||||
if(this.fileList.length<1){
|
||||
this.openedFile = this.localGet('Open')||'';
|
||||
|
|
@ -207,7 +207,6 @@ saveKey(e) {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
Toast(message, duration){
|
||||
const e = new Event("hass-notification",
|
||||
{bubbles: true, cancelable: false, composed: true});
|
||||
|
|
|
|||
Loading…
Reference in a new issue