Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get multple pickups a day to work. #78

Closed
SigurdVie opened this issue Nov 26, 2023 · 23 comments
Closed

Can't get multple pickups a day to work. #78

SigurdVie opened this issue Nov 26, 2023 · 23 comments

Comments

@SigurdVie
Copy link

Hey! First off, thanks for the card! I just have some problems with it, might be me just misunderstanding it ofc.

I use https://github.com/mampfes/hacs_waste_collection_schedule to create a schedule of when my garbage is picked up, and it creates separate whole day events for those pickups. So for example; on Monday I have a pickup for waste and organics. But instead of displaying both, the card only displays the waste. Any idea why?

I have double check to see what the actual names the waste collection scheduler is assigning them.

(Matavfall is essentially organics and resavfall is essentially waste)
image

image

@Slippery-Silvia
Copy link

Exactly the same issue for me also.

@jankete
Copy link

jankete commented Nov 28, 2023

I can also confirm this.

@Klorins
Copy link

Klorins commented Dec 3, 2023

For me it only shows up if the event is the same day or the next day.. not the next event in calendar.

@idaho
Copy link
Owner

idaho commented Dec 4, 2023

Hey,
currently it supports only the first event which comes up and is a whole day event.
I'm currently working on it to show multiple whole day events and even non whole day events.
Even it will only have a look for the next 2 days.

So possible you can give me some answers about some wishes you have beside support of multiple events.

  • How far it should look into the future? ( currently 2 days, which is hard coded )
  • What is, if you have today some pickup and in two days the next one. Should both be displayed or should there be a time when the current event should disappear and the next should be shown?

@jankete
Copy link

jankete commented Dec 4, 2023

My thoughts about your questions:

I think it would be good if we could configure how far it looks into future. Some may prefer 2 days and others would be happy with 2 weeks. Or it could the display the next date for each label without giving a timespan.

And when there are multiple pickups the same day, all of them should be displayed.

@Slippery-Silvia
Copy link

Slippery-Silvia commented Dec 4, 2023

I feel the options in this card mislead me to believe multiple bins could be configured from the single card.
maybe group the options with dropdowns or something?

this is an example of my custom mushroom card. that i am still using until being able to use trash card with multiple days.

Would we be able to choose a sensor instead of a calendar date?

I am sure it could be better done, but it works well for me.
image

  • type: custom:mushroom-template-card
    primary: ''
    secondary: |-
    {{ states('sensor.general_waste') }}
    {{ states('sensor.recyclable_waste') }}
    icon: >-
    {% if is_state('sensor.recyclable_waste', 'Recyclable waste in 6
    days') %}
    mdi:recycle
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 5
    days') %}
    mdi:recycle
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 4
    days') %}
    mdi:recycle
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 3
    days') %}
    mdi:recycle
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 2
    days') %}
    mdi:recycle
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 1
    days') %}
    mdi:recycle
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 0
    days') %}
    mdi:recycle
    {% else %}
    mdi:trash-can-outline
    {% endif %}
    entity: sensor.recyclable_waste
    multiline_secondary: true
    icon_color: >-
    {% if is_state('sensor.recyclable_waste', 'Recyclable waste in 6
    days') %}
    yellow
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 5
    days') %}
    yellow
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 4
    days') %}
    yellow
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 3
    days') %}
    yellow
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 2
    days') %}
    yellow
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 1
    days') %}
    yellow
    {% elif is_state('sensor.recyclable_waste', 'Recyclable waste in 0
    days') %}
    yellow
    {% else %}
    green
    {% endif %}
    tap_action:
    action: more-info
    fill_container: true
    layout: horizontal

@toabi
Copy link

toabi commented Dec 6, 2023

An "Issue" is also that if there are trash collections day after day… it only shows "Today" but not that "Hey, other one tomorrow!" (Which is the more important thing, at least from the afternoon, usually)

@SigurdVie
Copy link
Author

My thoughts about your questions:

I think it would be good if we could configure how far it looks into future. Some may prefer 2 days and others would be happy with 2 weeks. Or it could the display the next date for each label without giving a timespan.

And when there are multiple pickups the same day, all of them should be displayed.

Yeah, I really agree with you here @jankete, having it be configurable by the users would be great. And having it display multiple pickups the same day would also be great! As that is what I originally thought the card did.

@markjsmith
Copy link

I really like how it displays and have tested it to show birthdays, and it works! But just shows the label which I set to Birthday. It would be great if you could set the label or have an option to use the event label instead? This would work well for multiple events too to differentiate them.

@idaho
Copy link
Owner

idaho commented Dec 13, 2023

My thoughts about your questions:

I think it would be good if we could configure how far it looks into future. Some may prefer 2 days and others would be happy with 2 weeks. Or it could the display the next date for each label without giving a timespan.

And when there are multiple pickups the same day, all of them should be displayed.

I've created a new PR to implement at first a config setting for the next days we want to inspect. #106 #93

@Lethal83
Copy link

Hey, currently it supports only the first event which comes up and is a whole day event. I'm currently working on it to show multiple whole day events and even non whole day events. Even it will only have a look for the next 2 days.

So possible you can give me some answers about some wishes you have beside support of multiple events.

  • How far it should look into the future? ( currently 2 days, which is hard coded )
  • What is, if you have today some pickup and in two days the next one. Should both be displayed or should there be a time when the current event should disappear and the next should be shown?

Thanks for creating this. I’ll chime in with my 2 cents.
I would like to see it as a configurable time frame to see how far ahead to look. Me personally would like to see what tomorrow is, then what today is, then what the next weeks pickup is. My situation is general waste or rubbish is weekly, then we only have recycling, and green waste (aka organic) which alternate each fortnight. So I would like it to show Rubbish and Recycling tomorrow, Or Rubbish and Greenwaste today. Then Rubbish and Recycling in 5 days.
Keep up the awesome work.

@Framstag
Copy link

Hi, also have the problem, that it only shows the first event of two event at the same day. Regarding your questions:

IMHO the ground question is, what are the visual semantics of the component? Is it a timeline or is it a notification (like on a mobile) for an event or...?

I would like to behave it like a timeline with a configurable amount of days to look up in the future (where 2 days is a good default value). So if there are two "fetches" tomorrow and one the day after that, it should show all of them - but possibly visual distinguished (lighter color for later events or some gap?).

It is OK, if it will only show the next fetching slot, but in this case with all events for that day (of course).

It should still be effectively invisible if there is no event at all...

@idaho
Copy link
Owner

idaho commented Dec 17, 2023

Hey,
so I've some ideas how to show more than only the next event.

This needs a bit more preparations.

First i will redesign the editor. At the moment it is really full of features and getting more.
My idea is to have a tab for the appereance and one for the pattern settings. In those we can than add more custom patterns and not only the predefined ones.

Possible with some more pattern settings for the label which is displayed and using regular expression or a normal string matching (simple and expert mode)

An option to toggle the date info line. So that that it will show the day or how many days are left till this event.

An option at which time a whole day event should disappear.

A feature which filters non matching events (There is a PR for it #113).

And two different views.

  • A simple view which shows the current events. Not only one for the current / next day
  • A timeline / flow view. In here it will show the current active events. The next important, like what will be picked up tomorrow and a small preview for the next X days (which will only show colors, icons, and a days till info)

@idaho
Copy link
Owner

idaho commented Jan 4, 2024

I'm currently working on a new release. I've create a beta release which contains

  • New editor layout
  • Showing multiple events

https://github.com/idaho/hassio-trash-card/releases/tag/2.0.0-beta.0

How to get the beta https://hacs.xyz/docs/faq/beta/

Next steps:

  • Beautify UI

@dMopp
Copy link

dMopp commented Jan 5, 2024

I'm currently working on a new release. I've create a beta release which contains

* New editor layout

* Showing multiple events

https://github.com/idaho/hassio-trash-card/releases/tag/2.0.0-beta.0

How to get the beta https://hacs.xyz/docs/faq/beta/

Next steps:

* Beautify UI

NICE addon, even more nice beta version. Many thanks (WAF increased a lot again :D)

@verboEse
Copy link

verboEse commented Feb 3, 2024

I do have the 2.0.0-beta.0 installed, but of the two pickups next Tuesday only one is shown in the dashboard. Beside that, I love the module. Thanks for your great work!

@verboEse
Copy link

verboEse commented Feb 9, 2024

Correction: Must be something with Browser caching. On a private Browser window it works!

@waspxx
Copy link

waspxx commented Feb 15, 2024

Same issue here with 2.0.0-beta.1

In private browser it works. Nope in a normal window with cache cleaned.

@Klorins
Copy link

Klorins commented Feb 15, 2024

Same issue here with 2.0.0-beta.1

In private browser it works. Nope in a normal window with cache cleaned.
Screenshot 2024-02-15 161227

Seems to work for me, I just tested now without clearing any cache or anything.

Those are "fake" events I just added for tomorrow just now though.

@waspxx
Copy link

waspxx commented Feb 15, 2024

could you please share yaml card?

@Klorins
Copy link

Klorins commented Feb 15, 2024

could you please share yaml card?

Sure

drop_todayevents_from: '15:00:00'
next_days: 3
settings:
  organic:
    icon: mdi:flower
    label: Organisk
    color: purple
  paper:
    icon: mdi:newspaper
    label: Papir
    pattern: Papir
    color: blue
  recycle:
    icon: mdi:recycle-variant
    color: teal
    pattern: Plast
    label: Plastic and paper
  waste:
    icon: mdi:trash-can-outline
    label: Trash and organic
    color: cyan
    pattern: Rest-
  others:
    icon: mdi:dump-truck
type: custom:trash-card
entity: calendar.granum
filter_events: true
fill_container: false
full_size: false
use_summary: false

edit: formatting, mine was from a stack. Now it works as a single card.

@idaho
Copy link
Owner

idaho commented Feb 20, 2024

Hello some small updates to the next version (2.0.0-beta.3), already implemented

Features 🎉

implement alternative chip style by @idaho in #211
Implement color mode option by @idaho in #213
Option to define refresh rate by @idaho in #214
option to disable event grouping by @idaho in #200
Option to hide time by @idaho in #192

Bug Fixes 🐛

calculation of days till event by @idaho in #190
get multiple items from single event by pattern by @idaho in #201
Fix match always lower case by @idaho in #216

Next Feature

Implementing feature where it is possible to add as much custom pattern as you like next to the five predefined

BTW - see my Issue #209 ;)

@idaho
Copy link
Owner

idaho commented Mar 6, 2024

finally version 2.0.0 is release, i think most of the features and fixes are now included, i will close the issue

@idaho idaho closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests