I think you could use yaml templates for that.
Bar chart example in the discussions section: Stacked bar charts Ā· Discussion #35 Ā· dbuezas/lovelace-plotly-graph-card Ā· GitHub
Do you know what that might look like?
I tried variations of this, but I donāt think this works the same way as it does inside the actual themes. A search online is just giving me anything but all the themes that have been created.
- entity: sensor.sensor_temperature
connectgaps: true
line:
width: 3
color: {{ var(--background-color) }}
Thanks. I knew there would be one somewhere.
Mmm I seeā¦ Maybe thereās no way yet. If you make a feature request in the repo (in the issues section), and you come up with a nice way to specify it via yaml, Iāll implement it in the next release
But first, try out these variable names please
lovelace-plotly-graph-card/plotly-graph-card.ts at b92b1af50378b7c34e2de6d6dcdff0fd0de767b6 Ā· dbuezas/lovelace-plotly-graph-card Ā· GitHub
If you succeed, please consider a post in the discussion section āshow&tellā to help others out
Nope, no luck with those variables either. Iām guessing they are referenced some other way or just not available.
The config it saves is kind of unusual.
'[object Object]': null
Iāll give some thought to how to reference those values and make the FR as requested.
Thanks for the input!
I see. I guess that that requires direct support in the card then.
The good thing is that we have the notation: var("--background-color")
seems to be the standard in lovelace/dashboard.
Iām in vacations soon so I wonāt be able to do it quickly, please open an issue so I donāt forget
Hi,
Love the addon, especially the helpful āShow and Tellā-section which made it easy for me to get started with the card.
I cannot get the derivate example to work in my configuration. My JS-skills are poor at best, Iāve basically just copied the text in itās entirety and just changed the entity. This has worked flawlessly in my other cards so now Iām stuck.
Use-case: Iām using a sensor to measure the water volume in a container. The water is used for gardening and is directly correlated to the amount of water used by the plants. I currently have a sensor monitoring the water level which allows me to see the volume drop during the week and know when to refill it. Iād like to use the derivate-graph to see how the rate of consumption varies based upon the weather (been crazy warm for 4 straight days now) and the plant growth (bigger = more water).
Thanks again for a great card!
What a wonderful feedback piece to get
I see the bug now on that lambda example, i just fixed it please try it again. Canāt test at the moment but it should be working now. Thanks for pointing that out.
Works as intended! Thanks for your quick reply, should have provided more info on how it looked before.
Really good piece of work - Iām gradually changing all my graphs to this.
I do have a problem with one plot though. Is there anything wrong with this config? The fixed right y axis scaling works, but the left always autofits.
- type: custom:plotly-graph
entities:
- entity: sensor.pressure_stats_mean
name: Pressure
show_value: true
right_margin: 40
yaxis: y1
line:
shape: spline
- entity: sensor.pressure_change
show_value: true
right_margin: 40
yaxis: y2
line:
shape: spline
title: Pressure
hours_to_show: 24
refresh_interval: 10
layout:
yaxis1:
gridcolor: whitesmoke
zeroline: false
range:
- 900
- 1010
fixedrange: true
yaxis2:
gridcolor: whitesmoke
zeroline: true
range:
- -5
- 5
fixedrange: true
xaxis:
rangeselector:
"y": 1.2
buttons:
- count: 1
step: hour
- count: 12
step: hour
- count: 1
step: day
- count: 7
step: day
- count: 28
step: day
view_layout:
grid-area: footer7
Would you put this as a bug report under issues in the repository please?
Otherwise Iāll forget to take a look when I have time available
Hi thanks for the awesome tool!
I was wondering if it is possible to have āfixed, y-axis limitsā where scrolling is locked but based on a lambda value.
For example for room temperatures, I would like to make sure that the max value of all entities is included, but specify a hard coded lowerbound. Or for example for the lower bound, take the maximum, of the minimum value of the entities, and a hard coded value.
like for example
range:
- max(entities)
- max( min(entities), 20 )
Or if it is otherwise potentially possible to exclude certain entities from the automatic range calculation.
Hi I was looking for a way to show a particular D3 plot in home assistant and found this thread. What I want to be able to do is show a plot similar to the density plot shown here Density 2d with shading in d3.js
Do you think it is possible to use this card to create a graph like that?
Not yet, but soon
It will be a bit involved, the idea is that you will be able to use lambdas everywhere
unfortunately not at the moment. Feel free to post a feature request in the repo (under āissuesā) so I remember to look at it when I get back to the project
Hello Mateine,
i have a problem of overlapping of the legend and graph:
Is there a configuration parameter to solve this?
Thanks in advance
Frank
Yes, you can add a bigger top margin or move the legend somewhere else. Check out the readme and the discussions section for inspiration
@mateine Thanks for the great card, Iām using it already in quite a few places, although sometimes struggling to find the attributes and options needed to tweak things. My main request now is: Iām also interested in getting the Ploty card to work on the HA built-in long term statistics. Is there already some progress on this? Maybe I missed some nuggets of info on this somewhere? Thanks.