I believe the calendar doesn’t make the necessary attributes that the card needs.
Here is mine from the waste collection schedule integration: As I said you do not get all the attributes from the calendar.
Yeah, but only attributes what needs to be displayed is “days left”.
That is available and is shown in states. The only problem is when I use this in garbage card then it wont show “days left” number.
I tried the calendar and could not get it to work. I opened a GitHub issue with the coder of the card.
Please follow here. Not sure what else I can tell you.
I’m a bit late to the party, but this might be useful info.
On YouTube, Bruxy explains how to make a sensor template for state (to change icon color and/or text) and days remaining. The rest is using the capabilities of calendar and a card to display the collection info. Shifting pickup dates due to holidays can easily be done via the calendar GUI.
Hi, i have the same problem for the configuration with 4 static sources, and only one is working.
the waste_collection.yaml is like:
sources:
- name: static
calendar_title: Altpapier
args:
type: Altpapier
frequency: WEEKLY
interval: 4
start: "2023-01-11"
customize:
- type: Altpapier
icon: mdi:trash-can
- name: static
calendar_title: Biomuell
args:
type: Biomuell
frequency: WEEKLY
interval: 1
start: "2023-01-05"
customize:
- type: Biomuell
icon: mdi:flower-outline
- name: static
calendar_title: GelberSack
args:
type: GelberSack
frequency: WEEKLY
interval: 6
start: "2023-02-17"
weekdays: FR
customize:
- type: GelberSack
icon: mdi:recycle
- name: static
calendar_title: Restmuell
args:
type: Restmuell
frequency: WEEKLY
interval: 2
start: "2023-01-05"
customize:
- type: Restmuell
icon: mdi:trash-can
and the sensor’s are like: ( i have the sensors in a seperate directory, so it looks a bit diffrent to you)
platform: waste_collection_schedule
name: next_Muell
source_index: [0, 1, 2, 3]
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
platform: waste_collection_schedule
name: Altpapier
source_index: 0
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- Altpapier
platform: waste_collection_schedule
name: Biomuell
source_index: 1
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- Biomuell
platform: waste_collection_schedule
name: GelberSack
source_index: 2
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- GelberSack
platform: waste_collection_schedule
name: Restmuell
source_index: 3
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- Restmuell
i don’t know where my issue is ?
Did you try my setup above? I have not issues since I changed to it. If that works, then try modifying it. It took me awhile to get it to work correctly.
i have now recreated your config and it works. i am now testing step by step what the problem could be. unfortunately you don’t use a date as the start date and what annoys me is that i have to restart the server every time to get a result. it just takes a really long time…
You might be better off, if you’d ask in the corresponding thread, where others (eg. the developer) check for questions.
Not sure your question. Mine works correctly on each restart (I have a lot as I do beta testing).
My current card after yesterday’s OS update.
Thanks for jumping in. I created this topic for help in replacing the Bruxy integration. I posted my solution from yours and others help.
Yes, you are right, because i have test some config’s and i think it is a bug. i will post my config in the original thread
Okay, finally went ahead and set up a replacement for bruxy70’s calendar integration with local calendars and have everything working and displaying in lovelace correctly.
However, the one feature of bruxy70’s that I couldn’t figure out in Home Assistant is a way to change the event date based on holidays earlier in the week.
For me, my trash pickup is every Thursday, unless there is a Holiday on Sunday through Thursday in which case the trash pickup will be delayed (e.g., if Monday is a holiday, trash pickup will be Friday; if Monday and Tuesday are holidays, trash pickup will be Saturday; if it extends past Saturday, it will be skipped this week).
I don’t see any way in HA automations to edit a calendar entry (only create one via a service call).
I’m thinking I may need to just modify my trash pickup template sensor (as below where I calculate the number of days to the next event) to add logic to increase the number of days based on the holiday calendar.
{{ (state_attr('calendar.garbage_collection', 'start_time') | as_timestamp - today_at('00:00') | as_timestamp) / (60 * 60 * 24) }}
Has anyone tackled this?
And I know I could do this manually through the GUI by just editing the next date, but I really liked bruxy70’s solution that did this automatically.
Thanks,
phlepper
I’ve also moved on from using the awesome original solution from bruxy70 by using 3 separate local calendars - one for each type of collection, as they are all different schedules. I have new cards which are similar to the original card that I used to use which was designed for the garbage collection integration, and managed to setup automations with push notifications, to mimic what I used to get.
I gave up/didn’t have enough time to find a way of automating the date shift due to a public holiday - especially as sometimes our local collection doesn’t change the original collection date if it falls in the week of a public holiday, but sometimes (mainly) they do change the pickup date by one day. I just settled on manually changing the pickup day once I know if it will be changing or not (the local council have an app where you can see your next collection dates). My council pickup schedule isn’t reliable enough to fully automate, which is a shame, but a quick edit to the recurring event in the calendar as and when - I can live with that - until my local council provide an API that I can use to get the dates automatically.
Yeah it’s unfortunate that the service call doesn’t allow for editing a calendar entry, or deleting. It would be great if we could remove it and add a new one based on holidays happening that week.
bruxy70’s integration is gone from HACS. Is it broken with the current version of HA if installed manually? Of course there’s no guarantee that it will keep working as things get changed with new releases.
Thank you! That worked as expected.
One little thing: how can I change the date format?
Hi everybody !
I have a problem with settings for one of the sensors. In my region the recycle will be collected every 2 weeks.
How can I change the value for frequency to reflect this ?
I mean that I need to replace frequency: WEEKLY, with EVERY TWO WEEKS. What is the correct value in this case ?
Thank you in advance !
In the docs it says
https://github.com/mampfes/hacs_waste_collection_schedule/blob/ad0d2bd9950aad4f3002be8abe38a2b256e83f79/doc/source/static.md
FREQUENCY
(string) (optional)
Defines the frequency of the recurrence. Must be one of DAILY
, WEEKLY
, MONTHLY
or YEARLY
Not sure if every two weeks is supported for a static sensor?
Thanks !..I missed that part of the documentation.
To define a bi-weekly schedule for a sensor starting on the 05-Jan-2023, the yaml code has to be like this:
frequency: WEEKLY
interval: 2
start: ‘2023-01-05’
until: ‘2023-12-31’