ljmerza / light-entity-card

Control any light or switch entity
MIT License
233 stars 41 forks source link

Broken in Home Assistant 2021.6 #65

Closed SquaredCircleHunter closed 3 years ago

SquaredCircleHunter commented 3 years ago

Hi,

The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'.

https://developers.home-assistant.io/blog/2021/05/19/lit-2.0

ljmerza commented 3 years ago

The card has always worked for me as I do not use HA's internal lit but my own rolled up version. The blog post you mentioned says if you use the internal lit then its not recommended and to use an external one which is what all my cards were already doing. If you're having issues getting this card to work, then I dont belive this is the cause.

SquaredCircleHunter commented 3 years ago

I copy pasted the output/advise I found in the browser console log in this bug report. Didn't dive into the technical details, sounds like it's a false positive then. My card stopped working at the time of posting, maybe it's fixed in the mean time, I will reinstall it at a convenient time.

johnatanfeuillye commented 3 years ago

Hi @ljmerza, I'm also having same issue as @SquaredCircleHunter, where the card is no longer working since 2016.6 I have re-installed multiple times via hacs and manually with no success. Would be great to see your card back in my HA :)

ljmerza commented 3 years ago

are there any errors in the console? What's your config look like?

justr0st commented 3 years ago

Same issue with HA 2021.7.0 For example: this is a light entity, that allows selecting color, brightness and effect. Only effect is visible. config

Lovelace tab config:

Browser console log:

app.62541dd1.js:13499 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. 55704 @ app.62541dd1.js:13499 s @ app.62541dd1.js:36082 53918 @ app.62541dd1.js:1279 s @ app.62541dd1.js:36082 (anonymous) @ app.62541dd1.js:36082 (anonymous) @ app.62541dd1.js:42188 (anonymous) @ app.62541dd1.js:42188 browser_mod.js:1 Event {isTrusted: false, detail: "connected", type: "connection-status", target: Window, currentTarget: Window, …} ha-card-weather-conditions.js:381 WEATHER-CONDITION-CARD 1.9.9 light-entity-card.js:9160 LIGHT-ENTITY-CARD Version 4.2.2
mini-graph-card-bundle.js:1 MINI-GRAPH-CARD 0.10.0 buien-rain-card.js:309 BUIEN-RAIN-CARDVersion: 0.0.4 card-mod.js:5 CARD-MOD 3.0.12 IS INSTALLED button-card.js:425 BUTTON-CARD Version 3.4.2 floorplan.js:87 Floorplan for Home Assistant (ha-floorplan)Version 1.0.25 slider-button-card.js?hacstag=3754399611103:497 SLIDER-BUTTON-CARD v1.10.3 entities-btn-group.js?hacstag=373857882102:186 Entities-Button-Group Version 1.0.2
cloudy.svg:1 GET http://192.168.1.100:8123/local/ha-card-weather-conditions/icons/static/cloudy.svg 404 (Not Found) Image (async) (anonymous) @ ha-card-weather-conditions.js:270 setTimeout (async) (anonymous) @ ha-card-weather-conditions.js:270 Ct @ ha-card-weather-conditions.js:270 (anonymous) @ ha-card-weather-conditions.js:381 ha-card-weather-conditions.js:381 WEATHER-CONDITION-CARD 1.9.9 use HACS path to retrieve icons. browser_mod.js:142 BROWSER_MOD 1.3.1 IS INSTALLED DeviceID: f5259b79-1ffbd64d

ljmerza commented 3 years ago

@justr0st The console error is not from my card, it looks to be from home assistant itself. but it looks like your card is working? I can see it in the picture.

I have a fresh test home assistant and the card has always worked perfectly there as well as on my personal home assistant instance. At this point, it sounds like more of a troubleshooting issue rather than a bug so I would ask on the help forums https://community.home-assistant.io/t/light-entity-card/96146

johnatanfeuillye commented 3 years ago

Hi Ljmerza, Sorry for the delay, this is what I find in my console browser when loading HA

image

ljmerza commented 3 years ago

the light entiy card did load - you can see that from the black/grey box.something else is wrong

SquaredCircleHunter commented 3 years ago

@johnatanfeuillye @justr0st

Are you using KNX lights?

johnatanfeuillye commented 3 years ago

Thanks @ljmerza for quick reply. I'm not sure what it can be...

johnatanfeuillye commented 3 years ago

@johnatanfeuillye @justr0st

Are you using KNX lights?

I'm not using KNX devices. majority of my device are mqtt

SquaredCircleHunter commented 3 years ago

I plan RCA but can't do it very soon.

johnatanfeuillye commented 3 years ago

This morning I updated HA to 2021.7.1. Reinstalled light-card-entity and now it works...Any way, I'm happy now image

SquaredCircleHunter commented 3 years ago

Hi,

I just upgraded to Home Assistant 2021.7.1 and reinstalled the latest version of the card.

It is still not working.

I can confirm the LIT-thing is indeed completely unrelated.

What I found is that the color wheel is not being shown, because the dontShowFeature method requires "hs" being supported as a color mode: e.attributes.supported_color_modes && e.attributes.supported_color_modes.includes("hs");

The array contains only "rgb": e.attributes.supported_color_modes === ["rgb"]

When, for the sake of testing, I add "hs" to the supported_color_modes array in debug mode, the color wheel is shown.

I don't get it, because this worked in the past. My lights are RGB:

`supported_color_modes:

My card config

`

I am using KNX lights, my config did not change. It is theoretically possible that in the past they claimed support for "hs" and now not anymore. Config is set up for RGB (color_address)

name: "XXXXXXXXXX" address: 'X/0/11' state_address: 'X/1/11' brightness_address: 'X/3/11' brightness_state_address: 'X/4/11' color_address: 'X/5/3' color_state_address: 'X/6/3'

https://www.home-assistant.io/integrations/knx/#light

(for my future reference, color modes: https://developers.home-assistant.io/docs/core/entity/light)

SquaredCircleHunter commented 3 years ago

I just tested 4.2.2, works again!

justr0st commented 3 years ago

@justr0st The console error is not from my card, it looks to be from home assistant itself. but it looks like your card is working? I can see it in the picture.

@ljmerza Yes, the card was loaded and working, but without any controls shown, like color wheel and brightness. Only Effect selector was there.

However, with updated version 4.4.0 it works again. And here is what my original and unchanged card looks like now: config_new