I haven’t used pictures inside this card, so I do not know the path’s format. The picture card probably converts the file’s path into something else for the browser to fetch.
I suggest you:
Open the chrome devtools, go to the network tab and the find out what path plotly is trying to fetch the image from.
Then repeat with the picture card.
Compare both to get an idea on what to write in this card’s config so the path would match the url the picture card fetches from
Post your results here, others may also want to use what you’ve learned
I’m trying to plot the value of one sensor to another. Both sensors give an array of values of the same length. My first attempt was to do the following:
But this doesn’t work as the template gets deleted when saving the card. If i plug in the values of my sensors manually it does work, but not automatically. Any Ideas?
Hi Ryan, I would like to graph the inside temperature and when the a/c or heating is running. I have only one a/c system to monitor. Your solution looks really great. Could you share? Thanks, Norm
What I want to do is get sensor data points as y-values from three different sensor requests. The sensor reading is basically a set point temperature here, so only by updating it manually to the device, the value changes. Otherwise it outputs same flat number from the device. End goal would be to make an interactive graph, that by dragging the set datapoint on x-axis vertically, you can change the y-value and this gives a command to the device to change the value on there.
But just starting at the basics to get a single value for each of three points on y-axis and then making a spline through the 3-data points would be appreciated.
x:
- -20
- 0
- 20
y:
- sensor.temperature_point_low_req # how to insert static sensor value here (eg. 19)
- sensor.temperature_point_mid_req # how to insert static sensor value here (eg. 26)
- sensor.temperature_point_high_req # how to insert static sensor value here (eg. 58)
Hey smart people
I’m trying to switch an apexcharts-card over to Plotly and having difficulty. I think this problem has already been solved but as I don’t write code adapting the solution to what I am trying to do has not gone well.
My data is currently in sensor attributes and looks like this:
Hi Almus!
you need to set the attribute parameter in the entity (attribute: anything) to ensure attributes are fetched. Then use an fn filter, the attributes are in state?.attributes?.data
Then you need to return an object with xs (your dates) and ys (your values).
Edit: removed wrong example (see link posted by Almus)
If you need more help, then please open a Q&A discussion topic in the repo, it is easier there
Latest value is somehow computed and I think it’s releated to statistics:mean param. How can I get the latest value on the legend and not a computed one?
Would it be possible to report min/max/mean values on the legend for the period displayed?
Oh, I misunderstood. What you did is correct, the difference is just a rounding issue. Try rounding it yourself Math.round(ys.at(-1)*100)/100 or (ys.at(-1) + 0.005).toFixed(2)
Is there any way to display the value in each marker, I don’t know if it is possible in the Home Assistant version, in Plotly it is possible, according to the web site