bokub / rgb-light-card

💡 A Lovelace custom card for RGB lights
MIT License
412 stars 24 forks source link

Allow RGB card to work with groups (seems to work fine) #80

Open dave-vsdevs opened 10 months ago

dave-vsdevs commented 10 months ago

"card.js" line 85

    if (config.entity && (config.entity.indexOf('light.') !== 0 && config.entity.indexOf('group.') !== 0)) {
        throw new Error(`Entity '${config.entity}' must be a light/group`);
    }

I am using the https://community.home-assistant.io/t/auto-light-grouping/516373 auto grouping blueprint because I did not want to manually maintain groups. Making the change above seems to work fine for groups.

There might be some reason this causes problems further down the line but seems ok so far

I see this is a duplicate of #67 and a few others. But maybe the code will help somebody. Thanks for the CARD!