Closed a-p-z closed 2 years ago
No visual editor here either, gives this message instead:
Configuration errors detected:
Cannot set property setConfig of [object HTMLElement] which has only a getter
Originally posted by @gribber in https://github.com/a-p-z/datetime-card/issues/1#issuecomment-1134782205
I have tried on Chromium, Firefox, and HA android app without issues. I will try to start up a new instance of HA and install the datetime-card from scratch. In the meantime, if you have any detail, post it here
It might have something to do with card-mod, which I have installed, console log shows the following:
card-mod.js:5 Uncaught (in promise) TypeError: Cannot set property setConfig of #<z> which has only a getter
at card-mod.js:5:1163
@gribber, I have installed card-mod and I was able to reproduce your issue. @cjsmns and @cinghialino do you use card-mod too?
I have card-mod installed, yes
The error comes from card-mod, not from datetime-card. card-mod crashes because it tries to overwrite a method in datetime-card (setConfig) that it is immutable (has only a getter) without checking if it can overwrite that method.
Fixing card-mod, the datetime-card visual editor works.
Therefore, if you don't mind I would close the issue.
I would just make sure to write at the top of the description that this card won't work if you have card-mod installed.
I will add a few lines in the readme!
Just to let you know, I opened a pull request to card-mod
awesome, we can close it now if you want. Appreciate your commitment.
Yes, I also use card-mod.
Glad the issue was found.
Interesting... It says
No visual editor available for type 'custom:datetime-card'.
Looking at the screenshot you provided, I've managed to get one entity on there, but on the project page you have 3 entities. How did you get that?
This is what I have.
Originally posted by @cjsmns in https://github.com/a-p-z/datetime-card/issues/1#issuecomment-1134448654