New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different zones in History have same color #14705
Comments
An even better solution would be if you could define specific colors for zones (like the icon you can already define) |
@midcode |
+1 for the above suggestion. The frontend code already does dynamically construct variable names from entity attributes, you can find code like this
for constructing the appropriate variable name for a certain domain. There is nothing stopping you from bringing this to the next level and also construct names like this
with higher precedence than the more generic domain color, look up whether it is defined and if it is undefined then fall back to the more generic color for all entities of that domain. This would than also allow stuff like
And as a bonus, to make all the complaints about wrong colors disappear, make it so that
|
Just updated to 2022.12.5 and my problem with binary sensors in the History Graph Card is fixed. |
@alexeyzel Ваше замечание не относится к теме данного тикета про раскраску Зон. |
This would be a nice solution if the person entity cards and badges also use this colour. for example my wife works at multiple different sites i could make all these zones purple so easily see at a glance she is at work by the colour of the badge and the location text of the badge would show which site she was working at. |
Selecting a color for icons, buttons and badges dependingly on a current zone is already possible:
This code is untested, just to explain the idea. But this approach is not possible now for History. |
Home Assistant must work without theme. Adding variables is not a solution for many users. We can not say to the user : "add this variable to your theme to fix the history issue". |
i currently use card mod to achieve this but it would be nice to have in core/default without mods so it will not be broken in future updates. |
I agree entirely with this, it would be a nice solution to select a colour for the zone when you create it just as you choose the icon ui and then have that colour match the history graph. I know nothing of programming so this may or may not be achievable now or in the future |
These variables would be optional: If it doesn't find a variable that explicitly defines the color for zone 'foo' it would then use the mechanism that colors zones in some automatic or default way. The same could be done even for each individual entity, not only zones. With a consistent and predictable naming scheme it would be possible (and relatively easy) for advanced users to add variables for coloring individual entities, individual zones, etc. and when the user does not define such variables it would just do it automatically in some reasonable way. |
@piitaya Update: surely , there could be another ways; the main points are: |
@ApriliaEdd |
I like this suggestion. |
Just came across this issue and it still exists in 2023.2. History graph for device_tracker is made illegible due to the same color being applied to all non home/away zones. The previous behaviour of random colors for individual zones was a much better approach and made the history graph actually meaningful at a glance given that the purpose of the frontend is to present data in a visually useful manner. I'm not sure what coloring all non home/away zones the same is achieving but it certainly isn't making the graph any better than it was. Would really like to see the previous behaviour back even if as a prop when creating device_trackers. I think providing customizeable variables for each zone is a bit overkill and would rather have HA handle this out of the box as piitaya said |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
up |
It seems the different theme variables for different zones are working now. I found this out by reading through some very long threads in the forum and doing some experimentation on my own. It would have been nice if the devs who are assigned to this (and similar) issues would have commented about the current state of affairs instead of just silently implementing something, leaving the issues open and uncommented and and not telling anybody anything about it. |
Hello 👋 One effect of the new state colors introduced with For example you can define |
If a user lives in not-english country - then probably he will have a A possibility to define a custom color for a zone in a theme is a useful addition. Imagine a user who never dealt (or does not want to deal) with custom themes. So, an ideal solution could be:
|
We didn't added the state color variables to fix this issue. Person entities uses the friendly name as a state, not the entity_id so the state will be used. For information, it uses this function to slugify the state : https://github.com/home-assistant/frontend/blob/dev/src/common/string/slugify.ts
I really think we need to better solution for this issue. I only provide the current state as @prof7bit asked an update. For now, I don't have a perfect solution for this. |
Correct, and I wrote about user-defined variables based on this approach.
This is exactly what I wrote. And if friendly names are in Korean or Cyrillic (for instance) - then that approach cannot be used. |
would there be an easy way out of this scenario?: home: green ideally this would be in core somehow (might already be, so please forgive me if the case), or be added to it as minimum requirement? currently using:
but not sure if this is what your saying we can do already, or that you want to diverge from that |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Up |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
up |
up |
1 similar comment
up |
Checklist
Describe the issue you are experiencing
Earlier different zones in History have different colors when displaying a history for
person
ordevice_tracker
entities.Since 2022.12 all zones have SAME color which makes graphs not easy to analyse.
Describe the behavior you expected
Steps to reproduce the issue
as above
What version of Home Assistant Core has the issue?
2022.12.1
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Chrome 108.0.5359.99
Which operating system are you using to run this browser?
No response
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: