Hi. I have the HA frontend displayed on a screen in my hall and I’m trying to figure out how I can get a clock with HH:MM:SS ticking away in center of the top bar. If possible make it responsive so that it dissapears when the bar gets too narrow as I don’t need it on my phone . I’m using Lovelace. Can anyone point me in the right direction?
I’ve also experienced that ha throws an error even when the library is referred to correctly. Simply hard refreshing the browser window solves this but this needs more looking into.
Hi,
I was using your clock card for a while and it was working fine.
Today I updated HA to 0.86 and ever since the update I keep getting the following error:
If I play with the screen a bit, the clock will finally appear, seems like initially it is trying to load itself before the resources being completely loaded.
BTW. I do have resources defined in ui-lovelace.yaml as you mentioned in instructions.
Yes. I have this problem too. Not quite sure why it’s not willing to load this resource before. I’ve also had problems with the clock running out of sync on my display in the hallway so having it check the time with the server/browser every so often might be a good idea. Right now I guess it’s just pulling the initial time off the client and incrementing the seconds every seconds.
Hi I made a small text clock card if anybody is interested. It’s just a card for in a view that people can use who use homeassistant in a control panel like setup. It’s just a basic text clock with a few options.
Although reading through the posts, using the sensor.time also seams like the better option. Although, This one shows seconds.
I thought all I would need t o do is change the format of ‘HH:mm:ss’ to what ever I wanted.
I changed it but it did not do anything. Am I missing another line in the file.
You’re right. Only those two lines define the format. But I find that the way HA caches the js files in your browser makes it a bit of a bother to see changes. Try loading only the js file going to
http(s)://yourhainstance:8123/local/clock-card.js and hard refresh (ctrl+f5 in most browsers I think) and verify that you see the changes that you made to the file. Then go back to HA and do another hard refresh.
That worked for me during development without putting my HA instance into dev-mode where local cache is turned off. Please let me know how that works out for you
Figured it out last night. Using chrome browser, did F12 to bring up page elements.
Then went to the page reload icon (top left) did a right click and chose empty cache and hard reload.
Reloaded page and the changes were there. I know have it as shown.
Thanks for the ideas.
Now if I can change the times in other areas I would be a happier person.
carltonb
is it possible to make this card “language” sensitive?
I like to have the clock/date and it’s great but the name of the week day is in English only despite my Home Assistant is setup in Italian
Hi, I don’t want to change the date format but the language; I think you should use the moment-with-locales.js which is doing the job for you in a huge number of different languages…