amaximus / garbage-collection-card

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

[just an idea] Different approach and better readability... #27

Closed Ndrinta closed 4 years ago

Ndrinta commented 4 years ago

Hello everyone! Maybe it's just me or also some of you guys have the actual collection in the morning and the moment you actually bring your bin(s) in front of the house is the night before (or, if you forgot, the early morning of the collection day just before leaving for work) and by midday of the collection day you don't care about the card anymore and rather bothers you seeing it. Even though it was so useful a few hours before now you literally hate it to be there remembering you about something you've already done. So, ideally, I'd love to have an interaction with the card in a "Google Reminder" style (giving you the chance to mark it as "Done" anytime) but I know it would be too complicated to ask therefore I will tune down my requests to only the followings:

  1. Have "Collection is tomorrow" instead of "in 1 day". 2a. Have "Collection is today" instead "in 0 day". [before noon OR customized time] 2b. Have "Collection was today", OR nothing at all it just disappears again, instead "in 0 day". [after noon OR customized time]

This is something I thought a lot about in the past months because when it's evening on collection day and I still see that card it bothers me because it's really there for nothing, I mean I just care because I know it could be improved and I just have to dedicate the time to it and "fix" it. I wanted to know how many of you were interested in order to see if it was worth to then be shared or not.... I don't know if my idea makes sense for you, I would gladly help you guys in doing it but I wanted to see check with you fist because you're smart people and you can show me why I'm wrong or maybe you can even improve my idea. Just damping my though here... I'm looking forward to hearing yours!

sym0nd0 commented 4 years ago

I'd love this, especially the card showing 'Due today' or something like that, rather than 'in 0 days'. Ideally rather than 'in 1 days' 'Due tomorrow' would be perfect.

Although, it looks like something might have already been started on this in dist/en.json. So, this comment might be completely superfluous.

Ndrinta commented 4 years ago

Ended up with this solution:

  - platform: template
    sensors:
      green_bin_collection_countdown:
        friendly_name: Green Bin Collection Countdown
        value_template: >-
            {% set temp_days = state_attr('sensor.green_bin','days') %}
            {% if temp_days == 0 and now().hour < 11 %}
              Collection is today
            {% elif temp_days == 0  %}
              Collection was today
            {% elif temp_days == 1 %}
              Collection is tomorrow
            {% elif temp_days < 7 %}
              Collection is in {{temp_days}} days
            {% else %}
              More than a week away
            {% endif %}

Nothing special but better than nothing.

amaximus commented 4 years ago

Newest release (1.7.x) has a click[on the icon]&hide card for such cases.

Please upgrade, test it and get back to me with results.

sym0nd0 commented 4 years ago

Awesome, thanks. Saved me a job figuring out how to get the change to the integration to work with Node-Red. I'll give it a whirl.

Ndrinta commented 4 years ago

Cheers mate, looks like a nice update. I did solve this issue already and I already had the tap to hide feature. What I'd suggest you is to add the collection hour too (maybe you did and I missed it), as I said I hated to still seeing it at 10PM the day of the collection. I also gave a little refresh to the interface. Screenshot_20200830-201237

sym0nd0 commented 4 years ago

@Ndrinta Would you might sharing the config for your card please, really like the look of that.

amaximus commented 4 years ago

Any update on testing this new feature?

sym0nd0 commented 4 years ago

Funny you should ask, our bins have just been collected and I've just used it for the first time. Works great, clicked both (one on laptop browser and another via the Android companion app) and they disappeared instantly. Checked the sensors and the time of click is shown as the last_collection date.

Only thing that threw me was the need to click the icon, rather than the card itself. If it were possible to make the whole card clickable I thibk that would help with usability but if not it just needs to be spelled out to people.

Really pleased with it. Thanks!

amaximus commented 4 years ago

Ok, newest version (1.8.0) makes the whole card clickable when the collection day is today or tomorrow.

Please update, check and let me know.

sym0nd0 commented 4 years ago

Love that, works perfectly with my test sensor. Thanks for implementing it so quickly!

On Mon, 7 Sep 2020, 12:48 pm Atticus Maximus, notifications@github.com wrote:

Ok, newest version (1.8.0) makes the whole card clickable when the collection day is today or tomorrow.

Please update, check and let me know.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/amaximus/garbage-collection-card/issues/27#issuecomment-688273899, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANID4HBNA3VNBBGYWTSBUMLSETCCRANCNFSM4LGK4DPA .

amaximus commented 4 years ago

@Ndrinta , latest version (1.9.0) introduces a parameter (due_txt) that will allow displaying 'Due today' (or 'Due tomorrow') instead of 'Today [in 0 days]' (or 'Tomorow [in 1 days]').

Please update the card, check it on your side and get back to me with results.

amaximus commented 4 years ago

Closing this issue as there was no feedback on the originally reported enhancement, that was implemented btw.