šŸ’” Lovelace: RGB light card

This is the first plug-in I have downloaded from HACS where the resource URL points to an external source. The others I have tried thus far download code to the local \www\community folder and the corresponding module at the top of RAW points to the local files.
Question from the novice: Does this card fail to load if there is a loss of internet connection either during or on HA reboot?

Thanks!

Actually there are two options:

  1. You use HACS, which will download the right files and manage versions. In that case, the logic thing to do would be linking the card.js file from your /www/community folder.

  2. You use my method, as described in the README. The good thing is that the custom card will update automatically.However, the card may fail to load if your browser has a loss of internet connection (which is unlikely to happen if you managed to connect to your dashboard) and has no cache. The card has absolutely no link with Home Assistant being up or not, itā€™s your browser that does the connection to the jsDelivr CDN and executes the code.

Is it clearer now ?

Loving the card, was already using the slider-entity-row custom card for a brightness slider

Is there any way we could get a ā€˜hide when offā€™ option?

This would make this card perfect for me

Iā€™ve seen the conditional card but I want multiple entities in one card and the custom vertical stack card doesnā€™t seem to look right and spaces out the entities too much.

Thanks

1 Like

Yes, perfectly thank you. I had copy/pasted the manual install path instead of the HACS install path after installing via HACS. Minor quibble, but I wish HACS would place the HACS install path in the INSTALL section instead of way at the bottom under ā€˜Licenseā€™. I should have been more careful. Again, thank you for a great card!

type: entities
entities:
- type: ā€˜custom:rgb-light-cardā€™
entity: light.example_light
colors:
- color_temp: 160
icon_color: ā€˜#ffead9ā€™
- color_temp: 350
icon_color: ā€˜#ffa859ā€™
- color_temp: 550
icon_color: ā€˜#ff8000ā€™

Can you make this in a group? iā€™m a total noob with yaml but trying to learn. Iā€™m trying with - platform group but no succes. :slight_smile:
I have the Ikea lamps . But would like to have 3 buttons with color temp 160, 350, 550. in a group so lamp1, 2, 3 combined. And is it possible to have 3 other buttons to make Romantic Color 550? bright: 1% and white bright 100% and yellow 100% ?
Hope i dont ask to much haha in the mean time iā€™m trying to succeed.

Regards,
Tim

Hello everyone!

I updated rgb-light-card via HACS today and it messed up my lovelace completely.
First by having errors in card ā€œCustom element doesnā€™t exist: rgb-light-card.ā€ and later, after updating manually the resources in RAW editor kinda working but blocking the possibility to edit any cards with rgb-light-card and without having the possibility to use the RAW editor on lovelace.
(to go back I had to edit the file directly on my raspberry)

Iā€™m also unable to restore to a previous version of the plugin, HACS is not downloading the files

Anyone else is experiencing the same problem?

The update to 1.4.0 from 1.3.0 totally removed all the config from the community folder on my setup. Removing the plugin and reinstalling did not correct it so I had to manually add the folder back and all the required files to get it back and working.

This also affected a work colleague in the same way and he had to manually add it back the same as me.

I donā€™t have a snapshot of my previous folder.
What files need to go in the rgb-light-card folder?
(I only know card.js for sure)

Thanks

image

These 3 files restored it for me.

Tried and same results as before.
The card loads but I cant edit it and canā€™t open the raw editor either.

I will wait for a fix (hopefully soon)

Iā€™m terribly sorry about those issues youā€™re having :confused:

I donā€™t use HACS and had absolutely no problem, but Iā€™ll install it and try to reproduce it on my own Home Assistant

(And by the way @ardovini , only card.js is needed for the card to work)

Edit: I was finally able to reproduce the problem and attempted to fix it in version 1.4.1

1 Like

Had the same problem red card on lovelace using HACS. 1.4.0

The only way around it i found was to add in the new URL and take out the old URL.

  - url: https://cdn.jsdelivr.net/npm/rgb-light-card
    type: js

#   - url: /community_plugin/rgb-light-card/card.js
#     type: js

To people having problems with HACS + version 1.4.0:

Iā€™ve done a quick fix release.
Can you please uninstall the card, install v1.4.1, and tell me if your problems are solved?

Thanks a lot :+1:

Interestingly 1.4.0 works for me. :smiley: (HA 104.3, HACS 0.20.9)

I installed 1.4.1 and itā€™s not quite working yet.
If I add a card with only rgb entities it works but as soon I try to use a script it crashs hard like before: no card edit and no access to raw editor.

I tried to record a quick video, you can check it here (LINK)

For me scripts are pretty usefull because I use different color combinations for the lights.

Let me know if I can help debug it

1 Like

Thanks for the video, itā€™s really helpful
Are you sure you have version 1.4.1? Sometimes your browser cache may keep an old version, and sometimes HACS fails to update correctly

You can see the installed version in the Javascript console (press F12 key to open)

If youā€™re 100% sure you have version 1.4.1, can you tell me whatā€™s your Home Assistant version?

1.4.1 sorted the problem for me, thanks

1 Like

Just Uninstalled via HACS and confirmed the files and folders were removed then installed 1.4.1 and everything went back as expected :grinning:

1 Like

I confirm HACS did not update correctly the plug in.
Now in 1.4.1 everything seems to work fine.

Thank you very much for the support and for being this quick!
Iā€™ll let you know if something else happens

1 Like

EDIT: Never mind! I think perhaps I was hitting a caching issue? The icons are now working properlyā€¦

I was very excited to see ā€œAutomatic icon color when color_temp or kelvin is defined in a colorā€ in the release notes for v1.5.0. I just upgraded to v1.5.0 via HACS, and the new feature doesnā€™t appear to be working for me. As youā€™ll see below, the icons are all grey (except for the one that I defined via icon_color).

<snip>
  - colors:
    - brightness_pct: 60
      icon_color: '#FF942B'
      profile: relax
    - brightness_pct: 100
      kelvin: 2500
    - brightness_pct: 100
      kelvin: 3500
    - brightness_pct: 100
      kelvin: 4291
    - brightness_pct: 100
      kelvin: 4500
    - brightness_pct: 100
      kelvin: 5500
    - brightness_pct: 100
      kelvin: 6500
<snip>

I also tried using color_temp, which showed grey icons as well.

I was curious if this is working for anyone else? Perhaps Iā€™m missing something obvious.