amaximus / garbage-collection-card

Custom Lovelace card for Garbage Collection custom component
MIT License
128 stars 24 forks source link

due_color is not being applied when days=0 #61

Closed danielbrunt57 closed 3 years ago

danielbrunt57 commented 3 years ago

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):

amaximus commented 3 years ago

Thanks for the heads-up.

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

danielbrunt57 commented 3 years ago

Updated. No change... image

danielbrunt57 commented 3 years ago

image

amaximus commented 3 years ago

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

amaximus commented 3 years ago

Now it should be ok.

danielbrunt57 commented 3 years ago

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

amaximus commented 3 years ago

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