Hi everyone. Is there a way to change the colors of the various calendars integrated by google calendar?
I have tried many plugins (card-mod, atomic-calendar-revive). I have achieved some results but I have not found a way to change the colors that default home assistant assigns from the original calendar integration tab
The calendar section will list each calendar in alphabetical order based on “device_id”. Open up the calendar.yaml file and add #'s in front of each device ID to order them.
- device_id: office
would become
- device_id: 4office
The name won’t change (although you can make changes to the name section also), so you will never see these numbers, only Home Assistant will. (or you might later on while building an automation)
Here is the color order:
Red (bright)
Green (midway between light and dark green)
Blue (almost exactly Home Assistant’s blue, little darker)
Purple (Dark)
Teal
Orange
Brown
Purple (Light)
Green (Light/neon)
Magenta
Brown/Orange
I don’t think its possible at this time to skip colors.
I’m not sure when, but the order of the colours appears to have changed. I’m now seeing the following order:
Blue
Mauve
Teal
Orange
Gold
Purple
Lime Green
Red
Has anyone else noticed this change? Is there anywhere I can look for the official colour ordering? I would like to get my calendar back to its original “encoding”.
I wish there was a way to assign a colour to a calendar. This is how I do it for all my other calendar clients and it allows me to easily distinguish between personal/work/sports calendars. Does anyone have any hacks to do this?
I used that list above and created fill calendars to push my other calendars to the color I wanted and as long as you don’t ever use the filler calendars they shouldn’t show up on the calendar in HA. Pretty big PIA though I second being able to select colors easier.
edit When I say do this I am referring to the lovelace integration as you can select what order you want your calendars in there. As far as the main one that goes alphabetically, I am not sure.
I completely agree. I have many calendars spread across family members and type of event; having the colors not match what I use in my primary system (Google) makes it very difficult to use the calendar in Home Assistant. The ability to manually choose a color would allow me to move more into the HA ecosystem.
I’m not a coder but I believe it’s line 148 of this file
So what could be done is that this line would check if there’s a color attribute, if yes, use that, if no fall back on one of these random colors.
For example I could add the attribute colour in my customize.yaml file
but I don’t know what’s the correct syntax to get the colour attribute; or how to write a decent inline if in python… (I may also be totally wrong about everything in my post, I don’t know the codebase either).
is there some way to beg one of the coders to consider this?
FYI, a change like that wouldn’t get implemented as it uses the properties of the calendar in customize.yaml. A system would need to be discussed to color calendars by calendar name (or something else) in the frontend theme. Currently the only way to change any colors in a supported way is via frontend themes. Otherwise you’d have to use something custom.