The colors on the timeline graph of the history-graph-card are kind of random if you use it with “text-sensors” (all colors appear in the same order on every new state and is then used again if that state reappears). If you use multiple graphs to get an overview, you can’t:
(you can see here that e.g. purple is sometimes unlocked and sometimes locked - it’s impossible to see at a glance when which door was locked/unlocked)
Better would be at least fixed colors to states (e.g. calculate a hash of the string).
But better would be customizable colors to highlight good or bad states in the history. This also fits to binary_sensors where often e.g. an open door gets green color and closed door is red (but of course it should be the opposite).
It’s related, indeed. I thougt a longer time, if I should add it there or open a new topic, but the other topic is about colors of entities and this about colors of states (which I think is a very big difference).
Sadly not …there was a script from Thomas Lovén, but that doesn’t work since HA 2021.7.0.
At least the situation is a little bit better now:
If you have multiple timelines, the first appearance of a state defines the color. If that state appears in another timeline, the color stays the same (in the screenshot above, all “unlocked” would be purple), but the color still can change on reload.
You can define what the first, second, … color should be:
But my biggest wish has unfortunately not yet been fulfilled: Set custom colors for all individual states.
In my example:
unlocked: red
locked: green
lock’n’go: orange
I think that comes very close to your wish for unlocked, locked and lock’n’go
That’s a great custom card - thank you for the tip If I disable toolbar & selector it does what I need.
But I still hope that the native history graphs also get that function since we’re already very close to that.
I hope you recognize that. I translated the code from German