Day Countdown card

Since javascript can’t be uploaded here, change the .yaml to .js to use the file :slight_smile: .
I’ll eventually figure out how to use Github to make a branche and will upload it there :slight_smile: want to find a date fix first.

Uploaded it as a branche, won’t be merging as I haven’t fixed the date yet, but it can be downloaded from there normally (if I did it correctly).

1 Like

I just sent you a PR to your branch. Merge mine into yours and submit a PR to OP’s repo!

1 Like

Merged and pull request created for the OP’s repo! Thanks for the fix man :slight_smile: !

Hi there, i feel like im from the future. since the last message was posted in feb 19.
But i really want to have this card working. But i just keep getting all these errors while adding the card to my lovelace.

can’t define property “px”: Object is not extensible

type: ‘custom:day-countdown’
date: 11 july 2019
title: Compleanno Fha
icon_size: large

i hope someone is eager to help. thanks!!

Hi. I’m also from the future :slightly_smiling_face:. I was able to get this card working again by following the directions at

https://github.com/custom-cards/dual-gauge-card/issues/24
https://github.com/custom-cards/dual-gauge-card/issues/22

In short, I added a line and commented out another line in the day-countdown.js file

  setConfig(config) {
    this.config = JSON.parse(JSON.stringify(config)); //added this line
    if (!config.date) {
      throw new Error('You need to provide a date or all of this is pointless!');
    } 
    //this.config = config; //commented out this line

I made these changes in the terminal using vi editor. Then I removed and re-added the resource in the lovelace UI editor, cleared browser cache, and restarted HA. Hope this helps!