Skip to content

Commit

Permalink
Update yt_dlp-card.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ybk5053 committed May 18, 2024
1 parent b17341c commit edba56a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dist/yt_dlp-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export class YTDLPCard extends LitElement {
// The user supplied configuration. Throw an exception and Home Assistant
// will render an error card.
setConfig(config) {
if (!config.entity || config.entity !== "yt_dlp.downloading") {
throw new Error("You need to define yt_dlp.downloading as entity");
if (!config.entity || config.entity !== "downloader.yt_dlp") {
throw new Error("You need to define downloader.yt_dlp as entity");
}
this._header = config.header === "" ? nothing : config.header;
this._colour = config.colour === "" ? "#005eff" : config.colour;
this._entity = config.entity === "" ? "yt_dlp.downloading" : config.entity;
this._entity = config.entity === "" ? "downloader.yt_dlp" : config.entity;
// call set hass() to immediately adjust to a changed entity
// while editing the entity in the card editor
if (this._hass) {
Expand Down Expand Up @@ -246,7 +246,7 @@ export class YTDLPCard extends LitElement {

static getStubConfig() {
return {
entity: "yt_dlp.downloading",
entity: "downloader.yt_dlp",
header: "YT-DLP Card",
colour: "#005eff",
};
Expand Down

0 comments on commit edba56a

Please sign in to comment.