Last bar on graph is wrong, also hours to show omitting last day (history-graph show one day more with 720 hours).



aggregate_func: max
cache: false
color_thresholds:
- color: '#f0f042'
value: 15
- color: '#f0e342'
value: 7.5
- color: '#d0c442'
value: 5
- color: '#c0c042'
value: 0
entities:
- entity: sensor.daily_pv4
index: 0
name: Dzienna produkcja PV
group_by: date
hours_to_show: 720
icon: 'mdi:solar-power'
show:
graph: bar
type: 'custom:mini-graph-card'
entities:
- entity: sensor.daily_pv4
hours_to_show: 720
refresh_interval: 0
type: history-graph
Group by date will often show one less day than the history graph since using "group_by: date" will only display whole days compared to history graph where the first entry will be current time of day 720h. With mini-graph-card you'll get end of current day (00:00) - 720h.
I need more information than "last bar in graph is wrong", I can't really do anything with that information.
It is showing 0, but there is 2.3 value as I show on history-graph card. Bellow again there is 248 max value on history-graph but on mini-graph-card there is zero 0.


aggregate_func: max
cache: false
entities:
- color: '#0399ff'
entity: sensor.daily_water
index: 0
name: Example of last bar with 0 value
group_by: date
hours_to_show: 168
icon: 'mdi:water-pump'
show:
graph: bar
type: 'custom:mini-graph-card'
On my every bar graph last bar is 0:


I have the same, oldest day is always show as zero.
Eg.
168 hours, as You see most left blue value (tuesday) show 0.
Please note too on the marked value from Sunday (dirty yellow) which shows 5,28kWh

but when I reduce the period to 48 hours, the most to the left will be Sunday

which shows now the 0 value
What card version are you two on?
Open the browser developer console and look for the mini-graph-card version in the log.
0.9.3
Does it say that in the developer log as well? Or is that what's shown in HACS?
HACS only,
developer console log shows nothing about mini-graph-card (I have a logger set to error only)
but /home/pi/.homeassistant/www/community/mini-graph-card/mini-graph-card-bundle.js contains inside:
console.info("%c MINI-GRAPH-CARD %c 0.9.3 "
0.9.3
I'm using virtual env HA with manually installed mini-graph-card.

HACS only,
developer console log shows nothing about mini-graph-card (I have a logger set to error only)
If the console doesn't show any mini-graph-card version that probably means your browser is loading a version prior to 0.9.0 (logging of version introduced). There could be several reasons for this, the browser could be loading an earlier version from cache, the resource url might be incorrect, make sure it match the one stated in HACS, e.t.c.
0.9.3
I'm using virtual env HA with manually installed mini-graph-card.
Okay, does the issue persist if you set the option cache: false.
I'll try to reproduce it.
@kalkih - I didn't read that it was about the browser console ;)
I was looking for this in the HA dev console :)
Browser console show 0.9.3 :)
I also have set cache: false

Okay, does the issue persist if you set the option
cache: false.
Yes.
I have exactly the same issue. Any news on this?

Everything looks fine, except for the last bar which is always zero. I'm also using Version 0.9.3
I have the same issue. If I add 24 hours, the day that was zero is now correct, but the last bar is still 0:


I have sent a fix for this as it was bugging me for a while too :)
so, we waiting for new release for testing :)
@kalkih Could we get a release so we can implement the fix?
@kalkih please remember to update the version (logged in console) as I have forgotten to do it
I still have this problem. Is this fixed? 0.93 and HA 0.111.4

No, you need to wait for the next release - after v0.9.3. Maybe @kalkih is holding on and wants to collect more features for release v1.0.0 ;)
@kalkih - is it possible to make a beta version? (if the official release is not ready yet)
Okay, will make a release tonight 🙃
Out now ➡️ v0.9.4
Most helpful comment
Okay, will make a release tonight 🙃