Hi, I’m trying to create individual custom:button-card for calendar events, so far i use the following template to gather the attributes from my various google calendar entities
This works great and i’ve created a custom:button-card with the date number in a circle container to the left of the event name and time.
What i’m trying to do now is colour the circle container in the custom:button-card based on the calendar the event has come from, but i can’t find a way to change my template sensor above to also collect the calendar the event has come from for each state attribute.
I currently get these attributes from the above sensor
- start: "2025-12-02T08:00:00+00:00"
end: "2025-12-02T16:00:00+00:00"
summary: Car MOT and Service
but what i’d like to include is
- start: "2025-12-02T08:00:00+00:00"
end: "2025-12-02T16:00:00+00:00"
summary: Car MOT and Service
calendar: calendar.my_calendar_1
That way i cal dynamically colour the button card based on this.
does anybody know a way to gather this in a teamplate?
I previously used Calendar Card Pro Hacs which could do this but I want to create my own with custom:button-card
Thank you so much, this appears to work great. I spent 3 hours going round in circles with chatgpt suggesting things that didn’t work. now i just need to continue styling my custom:button-card, thanks for the quick reply.
If anyone is at all interested this is where i’ve got to so far with the card, the coding is a bit messy as it’s a mix of what i’ve found and what chatgpt provided. when i get something i finally like the look of i plan to create a button card template to reduce the repitition throughout my yaml.