Lovelace: Clock Card

Hi All

This looks great but Ive tried the js file in various places ie root of www and in a folder and nothing. The new resources tab in the dashboard is looking at /local/clockwork-card.js

Where is the local folder as I thought it was the www folder

Thanks

Martyn.

PS Im on version 111.4

it is.

What do you mean by “nothing”?

Hi

I had the js file in the www folder, added the location of the file in the resources tab and rebooted and tried to add the card to the manual card but it cant find the card js file to show the card.

I have a few manual cards and I have had to take the - off the type at the beginning for them to work.

How did you add the card to your system? did you copy it from the “raw” button or download the zip file and then copy the file over or some other way?

What is the location/path of the card js code right now and how did you define the location in your resources right now?

Ive just changed again as tried various locations to see if this worked and it didnt. its currently in root of www. Ive tried /local/ /local/www/ also

file that I uploaded to www
image

I downloaded the zip file and copied the code for the card into Home Assistant as I normally do.

I keep rebooting after moving to test

Thanks

Martyn

I don’t see the path defined in your resources section

The first image with the name of the file is it

Resources moved a couple of versions ago from the top of the page

Hopefully this is a better screenshot of my resources.

Right.

Look at the rest of your card definitions. They all have a “path”. The clockwork card doesn’t.

It should be:

/local/clockwork-card.js

In one of my original posts, i said Id tried with local and also www and on its own and it doesn’t work.

As you saw, i have a few resources and they work fine. It must be HA or the js file

Maybe it’s the js file.

I just looked upthread and saw that someone else had an issue and when I tested it on v108 of HA it wouldn’t for me either.

Looks like the card hasn’t been updated to work with newer HA versions.

I thought Id read that too but looked at a lot of stuff. The guy who developed it didnt sound up to keeping it going as he didnt really want to release it and said it will work for as long as it does.

Ill stop wasting my time. Thanks for your time though.

Hi, is it failing in weird ways for you guys?
After reading this thread I installed the component, fully expecting having to patch it, but to my surprise it’s worked OK.

A couple things I had to make sure to get right:

  • First, my (now correct) import path is /local/custom-lovelace/ha-clockwork-card/clockwork-card.js
  • Second, I was missing the sensor in configuration.yaml and now it looks like this:
  - platform: time_date
    display_options:
      - 'date'
      - 'time'
      - 'beat'
      - 'date_time_iso'

Can you put your manual card details on aswell please ? Might just help everyone ?

I put this to the side as it looked like it wouldn’t work. So this nay resurrect the card for my HA.

Thanks

Martyn

Hi

All working now. Thank you. Shame there is no timezone for Florida. Nearest i could find was New York.

What timezones can we use with this ?

entity: sensor.date_time_iso
locale: en-GB
other_time:
  - America/New_York
  - Australia/Sydney
  - Australia/Brisbane
style: |
  .other_clocks { display: none; }
  .time { text-align: center; }
type: 'custom:clockwork-card'

image

Is there a way to rename the time zones to a friendlier name rather than see _ and I could then change it to Florida lol

Mine is now showing like this in chrome and android HA app but ok on Microsoft edge.

Any ideas ?

Facing same issue on Chrome. Any solution?

Maybe the problem is caused by loading cutom elements mechanism (lazy load) on 0.107 and above versions. Try to install “hui-element” (https://github.com/thomasloven/lovelace-hui-element). It solve my problems with custom cards :wink:

Hey all, trying to install this. I’ve installed this under custom components and added the resource. but it tells me the component does not exist?

Is there something I’m missing here?

EDIT: created a new folder in www called custom-lovelace and then changed the resource path to /local/custom-lovelace/clockwork-card.js

Now working.

One thing is how to change the locals, I cant see how that’s being done??

If I wanted Japan or even China, doesn’t actually work just by putting country/city??

EDIT2 you need the region, so for Tokyo its Asia/Tokyo

Well… that was a complete waste of time HAHA

Does Not work on mobile devices, I missed that.

Thanks anyway :slight_smile: