Skip to content

Commit

Permalink
Fix for Home Assistant 0.118
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Nov 20, 2020
1 parent 9e53012 commit 70b281f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions custom_components/favicon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,11 @@ def new_render(*args, **kwargs):
<script type="module">
customElements.whenDefined('ha-sidebar').then(() => {{
const Sidebar = customElements.get('ha-sidebar');
const render = Sidebar.prototype.render;
Sidebar.prototype.render = function() {{
const retval = render.bind(this)();
retval.values.forEach((val, i, arr) => {{
if (val === "Home Assistant")
retval.values[i] = "{title}";
}});
return retval;
}}
const updated = Sidebar.prototype.updated;
Sidebar.prototype.updated = function(changedProperties) {{
updated.bind(this)(changedProperties);
this.shadowRoot.querySelector(".title").innerHTML = "{title}";
}};
}});
window.setInterval(() => {{
Expand Down

0 comments on commit 70b281f

Please sign in to comment.