Lovelace: mini graph card

I see, sorry I toiught they were two different graph because of the title, my bad :slight_smile:
I guess that this might somehow be a bug,

But technically also the 4th bar is wrong, because in the history graph the 4th should be almost half of the previous barm how many “reads” are done each day?
Cause maybe that’s the issue there, maybe a good FR should be havving “points_per_day” rather than per hour.

Are you sure it only reports once a day? Judging by the graph it looks to be updating regularly and then reset once a day. (especially noticeable when looking at the last day).

This won’t work well with this card, since the graph is based on a moving average calculated on the history data from each data point (24 hours in this case).
Also, if you would open the UI with the graph in the middle of the day (12:00) for example, each bar will consist of history data from 12:00 a clock - 12:00 a clock previous day, while you are probably expecting it to calculate each day from 00:00-24:00.

Anyway, I think you could make it work, but it would require some work.
Kind of hard to explain but if you could make the sensor only report once at the end of the day (at the exact same time every day), maybe just before 00:00 and then also reset itself, I think it could work. The sensor would need to be updated at the exact same time every day though, if not, two updates could end up in the same 24 hour timespan. An easy workaround would be to set hours to show slight lower (286) but still have it display 12 bars, that way each day would be 23h50min and you have a 10 minute margin for the sensor to update.

Also, there’s a bug with the bar chart atm, there’s an additional bar, the last (right) bar shouldn’t be there.

@kalkih
Is it possible to use the bar chart card for each bar to show watts consumption day?

It’s possible, depending on how the sensor data looks. The graph is calculated by moving average, so not really suitable for such use cases but it’s possible. Read the post above for more details.

1 Like

Thank you for the wonderful cards! I love the updates in 0.3.0! :heart_eyes:

1 Like

Can u show an example?

Sorry, I don’t have any sensors like that.

 - entity: sensor.power_gen_cum_prior

used for the graph card is indeed reported once at midnight derived from

 - sensor.energy_generation

using a template sensor.

I am having problem with this card.

This is what i get using the sensor.living_room_heating.

50

Problem is that at night (from 00:00 to 07:30) the sensor in /states shows always 0% as value, while in the card it shows always 16,5%. The thermostat is off between those hours. Why i don’t get 0% as the sensor says?

Sounds like the sensor might be reporting something that’s not considered a number when it’s “off/0”, the graph would then ignore those history entries.

But I would need access to the history to give you a definite answer.

Here’s a quick post on how you can access the history

Hmmm i’m not so familiar in such things
 I can wait if you can find some fix for this
 sorry to not help you.

If can this helps you:

26

This is what i get if i choose more infos about the sensor.

I’m not able to recreate this issue, and I can’t fix it without having access to the history data.

It does look it is doing ana verage

But
 @maurizio53 also my question is
 why/how would you measure heating in %?

Is that the % of power the heater is providing?

Thanks :slight_smile:
Andrea

I hate to be picky (take it as a sign that everything else is so great that this is all I can come up with :slight_smile: ) but using a theme with rounded corners gives this

image

To be honest, I don’t care if you don’t but that is only because I refuse to let my OCD take over


Yes, that’s the power of heating
 Using Tado as smart thermostat

lol, that does indeed look bad, makes me :nauseated_face:

Was a quick fix, will be available in the next version, not sure why I allowed overflow from the beginning :thinking:

If you can’t wait, you can use card modder in the meantime and set

style:
  overflow: hidden

hyperion_8123_lovelace_4%20(29)%20copy%204

1 Like

Maybe my problem is the same as mauritzio53:

It’s zero for a while and It stays > 0.

Data here: https://pastebin.com/T5ZGhi19

The graph is calculated by a moving average, which might explain why you don’t see it dip to zero instantly.

Thanks for the data, I’ll play around with it and see if there’s an actual issue with the graph algorithm or if this in fact is a side effect of moving average.

Perhaps an option average true/false so that based on the graph and the need can be changed to do or not do an average of values?

That won’t be happening, there’s the history-graph already if you want that type of a graph.

Not basing the graph by moving average would make it basically look and function like the default HA graph, straight lines and jagged edges, no smooth curves. Also, the bar chart wouldn’t be possible without calculating some sort of average.