Thanks. I was using the sun.sun attributes which are timestamps as well, but forgot to decrease the value with one day as it shows the sunrise of the next day (after the sun has risen today), so the value wasn’t visible in the graph of today . The same goes for the sunset.
Now using this code and that works fine:
It will combine todays date with sensor.date and the time of the sunrise and sunset from sun.sun. Those times are of the sunrise and sunset from tomorrow instead of today at some point, but hey those few minutes are not visible in the graph.
I’m looking to chart energy pricing forecast using the Octopus Agile integration. It creates an entity with each 30min timeslot and price as an attribute. I’ve been racking my brain (as a js newbie) to try and get the right data_generator syntax to chart this. Can anyone help?
The entity looks like the image.
A templates as per below seems to output what I need, bust I can’t make a js function to match in the data_generator.
{% for attr in states.octopusagile.rates.attributes %}
[{{attr}},{{state_attr('octopusagile.rates',attr)}}]
{% endfor %}
@DavidFW1960 I loaded your exact code, just changed sensor, duration (to 1h) and grouping (to by 1m) and seems to work properly:
There must be something wrong elsewhere…
BTW playing with options I not noticed that decimalsInFloat overrides y_axis_precision, but I’ve seen no difference that float_precision would do…
One more observation. I use ApexCharts to monitor network bandwidth on various interfaces on my router (using exactly the same code for all of them). I have one interface that is very specific - it is for build in LTE modem, that is used only as failover, so normally it generates no new bandwidth consumption data. And this one behaves exactly like in your case, not rounding labels to no decimals:
First of all, what a nice graphing card! I’m trying to replace a mini-graph-card where I have the state values on top of the graph, I’ve found out that this is also possible with the ApexChart. However, I noticed that the shown value is the result of the aggregate function and not the most recent state of the sensor. Is there a setting to change this behaviour? I’m graphing power entities which I average per 10 minutes to reduce the loading time but I would like to see the most recent value to have a good indication of my real power usage.
Hey, how do I change the Y axis minimum span? I have a temperature sensor
and I want to the graph to show at least 10 degrees on the Y axis. Right now it shows movement all over the place even though its only in the 0.1 range.
Good news! Waiting impatiently for coming Wednesday to apply I’m not in beta channel)! Hope this will resolve also issue with my sensor for LTE bandwith