amaximus/garbage-collection-card

due_color is not being applied when days=0

danielbrunt57 opened this issue · 7 comments

Describe the bug
I've just noticed that due_color is not working. The due_1_color is still being applied when number of days is 0
To Reproduce

type: vertical-stack
cards:
  - type: 'custom:garbage-collection-card'
    entity: sensor.waste
    icon_color: black
    due_color: red
    due_1_color: green
    due_txt: true
  - type: 'custom:garbage-collection-card'
    entity: sensor.recycling
    icon_color: black
    due_color: red
    due_1_color: blue
    due_txt: true

Expected behavior
I expect to see the red!

Screenshots
image

Environment (please complete the following information):

  • Garbage Collection Card version: 1.16.2
  • Browser: Firefox
  • Browser language: en-ca
  • Home Assistant Version: 2012.12.0

Thanks for the heads-up.

Fixed in the newest release (1.16.3).
Please update the card and get back to me with results.

Updated. No change...
image

Sorry, I included the wrong version into the package. Will add a new release right away.

Now it should be ok.

Perfect, thanks! So how long has that been broken and gone unnoticed??

The issue has been around since the 'Clean code' commit. There is no formal testing, definitely the code review wasn't thorough.