You need to use the resample filter on both so the arrays are aligned (i.e. each index points to the same date on both), and then the store_var filter on the secondary entity.
This way you can access both histories from within the filters of one.
I suggest you visit the discussions section of the repository and see the examples there. It requires some thought but it will hopefully click after that
This thread and the examples in it have been a huge help! Maybe I can return the favor for someone out there by sharing where Iām at with my graph of room temps and HVAC stuff.
Is there a way to limit the X-axis panning to a specific range? Iāll often end up panning or zooming to a mostly blank graph of future time.
Iāve just installed Plotly and it seems to be doing exactly what I want.
I must admit that Iām not really sure where to get the documentation for it other than looking at the example and guessing.
Anyway, I have managed to get my gas usage plot by month with the following yaml:
type: custom:plotly-graph
entities:
- entity: sensor.daily_gas_consumption
type: bar
statistic: sum
period: month
name: Monthly
texttemplate: '%{y}'
filters:
- filter: x < new Date(Date.now() - 1000*60*60*24*31)
- entity: sensor.daily_gas_consumption
type: bar
statistic: sum
period: month
name: This Month
texttemplate: '%{y}'
filters:
- filter: x > new Date(Date.now() - 1000*60*60*24*31)
refresh_interval: 30
hours_to_show: 6M
layout:
xaxis:
rangeselector:
'y': 1.2
buttons:
- count: 1
step: month
- count: 3
step: month
- count: 6
step: month
and it works well (although much of it is copied without full understanding).
However when I change the button to (say) 1 month, it would be great if I could somehow change the āperiodā to be āweekā.
Is there a way?
Susan
How about formatting the legend so it does not hide under the buttons (1h, 1d, 7d) and also changing the styling of those, black font for instance to improve visibility ?
This card is absolutely amazing! Using it a lot for visualizing energy long term statistics.
Long term statistics are updated every 5 min during the HA recording period (10 days in my case). After the recording period, longterm statistics are kept standard on an hourly period.
I donāt know if itās possible, but is there any way to show the long term statistics for a 5 min period for as long as the 5 min period data is available and then seamlessly move over to the 1 hour period data as soon as there is no 5 min period data available anymore?
Now I need to choose:
5 min period: this gives me much more detail, but then there is no data anymore after 10 days
Add a trace with the recent history, but set it as internal and store it with a store_var filter
Add a trace with the 5 minutes statistics also set as internal. Using a a filter filter remove all data whose x is greater or equal than the first x val of the first trace. Then append both xs and ys using the fn filter and store it back to a var
Repeat with the hourly statistic but donāt set it to internal
first, thanks for this great card. Fast, and feature-rich!
second, I have a small issue: When restarting home assistant, then the curves shown by plotly have a gap for that period. Typically this gap is small, but for values which do not change often (e.g. a setvalue for a temperature), the gap is really big, and it is almost impossible to see the curve for this value.
The normal āHistory graph Cardā does not have this behaviour. Of course, this can be seen also as a feature of the plotly card, but I would need the behaviour of the history graph card with the plotly card.
And this is how the graph looks like with the gap (esp. the green and the red curves, the set values), you can also see the standard card (only one of the two setvalues is visible there):
What am I missing? I received an email, about a āScreek Workshopā, which lead me this Plotly interactive Graph Card. Liked what I was reading, and decided to install this Plotly Graph Card.
I am running HA and HACS which are both up-to-date, but when is search (in HACS) for āPlotly Graph Cardā. I get as far as āPloā when I get the message, āNo Repositories foundā .
Has anybody an idea how to do a barpolar chart for wind direction?
Iāve tried a few things but as a rookie donāt know where to get started and the documentation has absolutely nothing in this respect.
That should be possible, what do you have in mind?
Can you make a pen and pencil drawing and show what the data looks like and what exactly you want to visualize
I suspect the OP is after a windrose card, this may meet his need although it would be good to solve the issue using plotly, one less integration to load into HAā¦