INNER CODE UNIT · JavaScript

entity

ruudmens/LazyAdmin · Home Assistant/custom weather card/old/weather.js:106

    let entity = unusedEntities.find((eid) => eid.split(".")[0] === "weather");
    if (!entity) {
      entity = allEntities.find((eid) => eid.split(".")[0] === "weather");
    }
    return { entity };
  }

  setConfig(config) {
    if (!config.entity) {
      throw new Error("Please define a weather entity");
    }
    this._config = config;
  }

  shouldUpdate(changedProps) {
    return hasConfigOrEntityChanged(this, changedProps);
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…