Closed tom-lejeune closed 3 years ago
I can confirm this is broken
Thought this was just me. She's definitely broken. :crying_cat_face:
It's fairly easy to fix yourself, just replace the setConfig function with this:
setConfig(config)
{
const checkServiceRegexp = /^(light|group)\./
if (!checkServiceRegexp.test(config.entity)) {
throw new Error(`invalid entity ${config.entity}`)
}
this._config = {...config, buttons: config.buttons ? [...config.buttons] : []};
}
This solution does work in the standard HA theme, but not in a custom theme like IOS dark mode. Any suggestions?
edit: It doesn't work in the default theme.
So I uninstalled and deleted this repo in HACS and installed this fork: https://github.com/maur8ino/light-entity-row
It actually has another change in the code:
setConfig(config)
{
const checkServiceRegexp = /^(light|group)\./
if (!checkServiceRegexp.test(config.entity)) {
throw new Error(`invalid entity ${config.entity}`)
}
this._config = JSON.parse(JSON.stringify(config));
this._config.buttons = config.buttons || []
}
I only got it to work by deleting this repo and not manually edit it.
I did the same as mentioned for the custom-card "button-entity-row".
I added "config = JSON.parse(JSON.stringify(config))
" at line 163 like this:
setConfig(config)
{
config = JSON.parse(JSON.stringify(config))
const checkServiceRegexp = /^light\./
if (!checkServiceRegexp.test(config.entity)) {
throw new Error(`invalid entity ${config.entity}`)
}
this._config = config;
this._config.buttons = config.buttons || []
This works fine, even with a custom theme (slate, ios)
hi! don't work for me any of thise editing, i try to disistall and install the Mayr8ino' s fork; i can see the button but don't work and i cant hide the temperature's line too
sadly broken again with HA 0.108.6...............couldn't get it to work again this time.......
@LEJOUI great! Me too I uninstalled and deleted this repo in HACS and installed this fork: https://github.com/maur8ino/light-entity-row. It's working again now.
Can someone confirm that it is still working with HA 0.110.2? I have never used this custom card, but I am receiving this error... Thanks.
It does work. Delete this repo in HACS and use the fork of Maur8ino
It does work. Delete this repo in HACS and use the fork of Maur8ino
Hi , sorry what the link please ? :)
It does work. Delete this repo in HACS and use the fork of Maur8ino
Hi , sorry what the link please ? :)
It does work. Delete this repo in HACS and use the fork of Maur8ino
Got it to work! Thanks!
Thank you ! I just try thise but dont work for me the button cant touchable and dont work
Thank you ! I just try thise but dont work for me the button cant touchable and dont work
Do you see any errors in your log? Could you post your config for the card? How did you install it? Is the card added in the lovelace resources?
Thank you ! I just try thise but dont work for me the button cant touchable and dont work
Do you see any errors in your log? Could you post your config for the card? How did you install it? Is the card added in the lovelace resources?
the card was added to lovelace's resources thise the error : http://192.168.188.191:8123/hacsfiles/light-entity-row/light-entity-row.js:321:35 Uncaught TypeError: Cannot add property entity_id, object is not extensible and thise my card's configuration:
`entities:
thise the error : http://192.168.188.191:8123/hacsfiles/light-entity-row/light-entity-row.js:321:35 Uncaught TypeError:
You should uninstall from HACS. Reference to something like: /local/community/light-entity-row
thise the error : http://192.168.188.191:8123/hacsfiles/light-entity-row/light-entity-row.js:321:35 Uncaught TypeError:
You should uninstall from HACS. Reference to something like: /local/community/light-entity-row
i unistall and install many time but not change...
i dont have error but the button: "red blue fucsia off" wasnt button just text...
Just to be sure, you did uninstall this and install the fork from Mauri8no? Did you try to clear the cache?
I do assume that the spacing of your card config is ok?
yes im sure , the spacing is ok :)
I was able to reproduce your issue. Custom buttons don't work with this solution. I forked it and found a solution what works here. Could you give it a try? https://github.com/LEJOUI/light-entity-row
Hmm. I'm still finding some issues with other components in my fork. Will let you know if I find something else
I was able to reproduce your issue. Custom buttons don't work with this solution. I forked it and found a solution what works here. Could you give it a try? https://github.com/LEJOUI/light-entity-row
Woow Now work ! thank you ! the only one issue is thise: the button work, but, the mouse on button not change image from arrow to hand (like usual link)
Yeah, this was already the case I thought. Might look in that later. Fork should now do the tric for this. I found that
buttons: []
is required to make it actually work, even if you don't want to have custom buttons. Not a real coder/programmer here.
well, i add youre repo on my hacs :) now i follow easily your work :)
same issue here Cannot add property buttons, object is not extensible
.
But when i use this row inside declutering-card it works ok:
decluttering_templates:
bedroom_lights:
card:
entities:
- entity: light.bedroom_leds
showColorPicker: false
type: 'custom:light-entity-row'
- entity: light.yeelight_bedside_286c0786a55b
showColorPicker: false
type: 'custom:light-entity-row'
show_header_toggle: false
title: '[[title]]'
type: entities
Cannot assign to read only property 'buttons' of object '#