INNER CODE UNIT · JavaScript

properties

ruudmens/LazyAdmin · Home Assistant/custom weather card/weather-card.js:93

  static get properties() {
    return {
      _config: {},
      hass: {},
    };
  }

  static async getConfigElement() {
    await import("./weather-card-editor.js");
    return document.createElement("weather-card-editor");
  }

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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…