Skip to content

Commit

Permalink
Fixed typo in js
Browse files Browse the repository at this point in the history
  • Loading branch information
maziggy committed Nov 19, 2024
1 parent 3e3f57a commit ef2f754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/ppfdChart.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ class PPFDCustomCard extends LitElement {

if (!entityState || !light_off_state || !light_on_state) {
console.warn("One or more entities are missing, retrying...");
setTimeout(() => this.set hass(hass), 500); // Retry after a short delay
setTimeout(() => this.hass = hass, 500); // Retry after a short delay
return;
}

const currentPPFD = parseFloat(entityState.state);
const lastUpdated = new Date(entityState.last_changed);

if (!this.shadowRoot) {
requestAnimationFrame(() => this.set hass(hass)); // Retry after rendering
requestAnimationFrame(() => { this.hass = hass; }); // Retry after rendering
return;
}

Expand Down

0 comments on commit ef2f754

Please sign in to comment.