Skip to content

Commit

Permalink
Update config-editor-card.js
Browse files Browse the repository at this point in the history
  • Loading branch information
htmltiger authored Mar 3, 2022
1 parent 20d621c commit cb30d2a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions config-editor-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,20 @@ Toast(message, duration){

async Coder(){
const c="ha-yaml-editor";
if(customElements.get(c)){return;}
await customElements.whenDefined("partial-panel-resolver");
const p = document.createElement('partial-panel-resolver');
p.hass = {panels: [{url_path: "tmp", component_name: "config"}]};
p._updateRoutes();
await p.routerOptions.routes.tmp.load();
const d=document.createElement("ha-panel-config");
await d.routerOptions.routes.automation.load();
if(!customElements.get(c)){
await customElements.whenDefined("partial-panel-resolver");
const p = document.createElement('partial-panel-resolver');
p.hass = {panels: [{url_path: "tmp", component_name: "config"}]};
p._updateRoutes();
await p.routerOptions.routes.tmp.load();
const d=document.createElement("ha-panel-config");
await d.routerOptions.routes.automation.load();
}
if(!document.createElement(c)){
this.localSet('Basic', 1);
console.log('failed '+c);
}

}

async List(){
Expand Down

0 comments on commit cb30d2a

Please sign in to comment.