note: this card is currently inside another custom card (custom popup), but I did notice that the error comes up in the log as soon as I log into HA, before even navigating to the page that has this card on it. That was after a browser cache clear
This error comes from another custom card incorrectly defining LitElement using let/const instead of var. I can change to code to fix this but there are a number of other cards out there that wouldnāt work either. Not sure how many custom cards you have but I would try commenting out all of the ones in resources except this one and see if it works. From there enable one custom card at a time to see which one is misbehaving. Iād be interested to know because the dev needs to know his card is not configured correctly.
My guess is that itās this oneā¦ but Iāll have to do the testing that you mentioned to be sure as I have a fair few custom cards, but in saying that, most of them are from Thomas.
I looked at the code for that one and itās not that one. Iāve used a lot of Thomasās cards and they tend to be setup correctly so I would be surprised if itās one of his.
ok I updated the card to avoid issues from other cards. Try version 1.3.1 and let me know if you have any problems. I looked at some of the cards you referenced that I dont use myself and they looked fine. Itās definitely something thatās defining LitElement incorrectly just not sure what.
Love this project. I just got it working, but having problems with my effects list. I tried using input_select and also tried listing all of my effects, but no matter what it doesnāt show up. Iām not getting any errors and the color wheel and brightness slider are working perfect.
Any ideas?
Thanks for the work you put into this and sharing it with everyone.
if (this.dontShowFeature('effectList', stateObj)) return html``;
If you rework it like this:
let effect_list = stateObj.attributes.effect_list || [];
// if we were given a custom list then use that
if (this.config.effects_list && Array.isArray(this.config.effects_list)) {
effect_list = this.config.effects_list;
} else if (this.config.effects_list && this.hass.states[this.config.effects_list]) {
// else if given an input_select entity use that as effect list
const inputSelect = this.hass.states[this.config.effects_list];
effect_list = (inputSelect.attributes && inputSelect.attributes.options) || [];
} else if (this.dontShowFeature('effectList', stateObj)) {
return html``;
}
If thats the problem then HA is not computing the correct features list for those entities or the light entity is not configred correctly. Iāll try to see if there is a way to include it anyways without breaking other functionality. The problem is when you include group entities custom effect_lists will show up for all of them. Iām on the fence about this change for this card as whatās really happening is HA isnāt giving the correct feature list or some people are misconfigured.
Make sure you have effect: true on the light component so HA knows this entity has the effect_list feature. For my mqtt based light:
Got it working. I was using the DrZZs version of the Bruh LED strip. After I uploaded the Bruh LED strip my Card is now displaying just like it should.
Iām not saavy enough with this stuff to know why 1 sketch works and another doesnāt, but thatās what happened.
Thanks again for the time and effort you put into this.
Is there a way to disable the color wheel? I have a couple of switches that control Hue light groups that have just white lights in the group, but the color wheel still shows up. When controlling a single white light, it appears as is should, without the wheel.