I have installed a few themes through HACS and I would like to know what the best way would be to override a few colours. I have done it straight on the yaml file but obviously this gets overwritten when the themes gets updated through HACS.
Would there be a way to override a few variables in a separate files that could stay intact through updates?
Did you manage to achieve this? My scenario is slightly different - I want to define some global colour variables to use as thresholds wherever I use the custom mini-graph-card to display room temperatures. I’d rather not hardcode the css colour string every time I set it.
Creating a copy of the theme introduces a whole bunch of new issues because it’s now forked and creates a maintenance overhead with every update of the original.
/*
Idea stolen from https://gist.github.com/thomasloven/2a37152725c582fec4420ecedb65ebe3
Add this to your configuration.yaml
frontend:
extra_module_url:
- /local/ThemeOverride.js
And put the following into <config-dir>/www/ThemeOverride.js
*/
document.documentElement.style.setProperty('--ha-card-border-radius', '10px');