@kalkih So, first of all… thank you for this awesome card! I’m loving it. Ever since I saw some graph cards for Lovelace I’ve wanted to combine multiple entities and this one does it perfectly!
I’ve got a question though… I’m currently showing the values of two temperature sensors in a single graph. Now, I would like to use line_color_above, but applied to a single entity instead of the entire graph.
In the screenshot below you see the lines of the two sensors. The value shown (23.18 °C) is the value of the bottom of the two lines. The other room is above 25 °C (the upper line).
What I would like to do:
Change the color of a line to red when above 25 °C.
Change the color of a line to orange when above 21 °C.
Below 21 °C default color for a line.
But only applied to each line. So, the lower line would be orange and the upper line would be red in the above screenshot. What it does now (when using the below configuration) is making them both red.
Is that possible? Or is this not possible with the graph library used?
The color thresholds are actually supposed to be checked and applied to the lines individually, so what you describe is most likely just a bug.
Would be great if you could post this in an issue on GitHub, and I’ll tr to figure out what the cause could be.
Just that one graph indeed. I can’t see errors in the dev console.
Could it be that, because it displays solar panel energy, there are no values for some time (sun down)?
You’ll need to create a long lived token in HA and replace “LONGLIVED_TOKEN” in the snippet above with the one you’ve generated. Then replace localhost/port to match your HA setup.
I just tested it again and does seem to work, not sure what happened yesterday. Just reporting here that it does work.
The first screenshot shows both lines above a threshold. The lower value is above the first threshold (orange) and higher value is already above the second threshold (red).
The second screenshot shows that only the higher value is above a threshold (red), because the other sensor hasn’t gone over the first threshold yet.
I wasn’t succesfull with curl command (kept getting errors, not so familiar with it), so I tried to get some data with the help of grafana. Pleae see below.
By the way, in the mean time I see a small blue stripe popping up:
Ok, great, I actually also tried to recreate the issue yesterday, but wasn’t able to.
Let me know if it comes back.
Alright, thanks for the data, I guess the second column is the sensors state? The states reported as “-” could possibly be causing issues when computing te graph.
Can you confirm that the sensor sometimes reports the state “-”, I guess when it’s idle?
Alright, thanks for the data, I guess the second column is the sensors state? The states reported as “-” could possibly be causing issues when computing te graph.
Can you confirm that the sensor sometimes reports the state “-”, I guess when it’s idle?
Also, is this a template sensor?
The “-” are I suppose NULL values from the template sensor when there is no reply from the solarpanel converter.
Pls find below the template sensor config:
@Mariusthvdb, I don’t know, but maybe this information could be of interest to you.
I made the switch from the default SQLite database to MariaDB a few days ago, and accessing history data is now a lot faster and snappier.
Before, loading the logbook would sometimes take 30-60 seconds and other times not load at all, and this was after manually purging data older than 7 days. The logbook is still quite slow however, 3-5sec, but a nice improvement.
thanks. Ive done that already though, I use MariaDB like forever. Seems to work in the beginning, but Ive never been able to use the history or logbook options in the left hand menu without grinding the system to a hold.
Many people suffer from this, and no solution has been found as yet.
just this week Ive tried to change the recorder setup from an include domain sensor situation with excluding several sensors, to an exclude domain sensor setup and including sensors I want recorded. Took out about 400 sensors… still, no such luck in the history department.
Okay, sad to hear.
Possibly performance issues in the backend that manages the history?
I’m running HA on a pretty decent server, I guess that helps keeping the process from completely freezing.
Fixed!
Used a MySQL client to fill the NULL values with 0.0.
Now to get the template sensor to prevent the NULL values…
Thanks for your help and the amazing card!
@Mariusthvdb not sure if you still are using this card and is interested in this feature but I made some progress on dynamically changing line color, it’s not picture perfect but it’s working quite well.
Not sure if I should apply the gradient to the fill though, looks kinda weird.
I’m interested!! Would love this on my graphs for Speedtest. Kinda annoying when it drops below the threshold I have and the whole line changes to red.