Lovelace: mini graph card

Yes, this will be the visible by default in the next release when the hours_to_show option is set to higher than 24 hours.

2 Likes

That’s fantastic, many thanks!

1 Like

I found the error.
I was putting the code in ui-lovalace.yaml and it did not work. Now I put it Raw config editor.

Thanks
What I do not know now is in what file is saved the configuration that I write.

It hould be stored in the storage folder somewhere but you will need to keep using the UI.

Were you using yaml mode for lovelace?
If no, that might have been your original problem

Yes. I use Lovelace. But I use the hassio editor. Do not edit the yaml file. I thought they complemented each other.

I see, no or you use one way or the other as far as I know :slight_smile:

Sorry I didn’t think about that

no problem. I did not know that. What I still do not understand is where it is stored. LOL. thank you

1 Like

It’s either YAML OR the GUI editor

In the config directory


.storage/lovelace - is the JSON GUI version
ui-lovelace.yaml - is the yaml mode one

You either use one or the other, not both. They don’t complement each other they are mutually exclusive.

You set in config yaml:

lovelace:
  mode: yaml    #will use YAML file

OR
If you don’t specify the above, will use the GUI editor. (Storage mode)

There is a third lovelace mode called auto-generated which is used if you don’t ‘take control’

1 Like

I’m less than a week into HA and loving this card.

I want to display a bar graph showing daily total electricity generation (or alternatively, consumption).

show:
  labels: true
  state: false
  graph: bar
  hours_to_show: 168
  points_per_hour: 0.04166

Is the above correct if I want to only have one bar per day? That is 1/24 which is one data point per 24 hours? Or is this only going to seek out a data point once every 24 hours which will make this wildly inaccurate?

If so, that I guess would necessitate a template sensor to calculate daily totals?

The graph would display the average sensor value for every 24-hours.

Check out my reply here for a more in-depth explanation

I’d like to add a bar chart that shows be the usage of my boiler in hours per day.

So I’d like to have one bar for each day of the last 1-2 weeks. Is this possible with this component. There is an option points_per_hour but I think this would need one point per day. So should I just ad 1/24 points an hour?

A second bar diagram should show the change of that sensor over the day. So only one bar per hour and than the value should be zero again. This would show when the boiler ran. Any Suggestions?
Would be nice to do this directly with this card.
The only thing I can think of is setting a another sensor, but resetting it every hour instead of every day.

Read the post above yours and the post I quoted there.

1 Like

Thanks and sry for not reading the last posts.

so from the few posts I read it seems like there was not solution presented. So those are the sensors I use now. Those are time measurement sensors, so I’m not sure if you can change it somehow to use it for power measurement. But I want to post it here anymay, maybe it helps someone.

Both in sensor.yaml

daily reset at midnight:

- platform: history_stats
  name: Boiler runtime daily
  entity_id: binary_sensor.boiler_state
  state: 'on'
  type: time
  start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
  end: '{{ now() }}'

hourly reset

- platform: history_stats
  name: Boiler runtime hourly
  entity_id: binary_sensor.boiler_state
  state: 'on'
  type: time
  start: '{{ now().replace(minute=0).replace(second=0) }}'
  end: '{{ now() }}'

Hi @kalkih
Is it possible that the “group” option is messing around with the new HA options for border and shadow?
image

The group option removes card paddings and box-shadow, that is intentional.
And since the latest release version 0.3.1, card content is no longer allowed to render outside of the card, this includes the border-radius, hence why the title is getting cut off.

Which means that is incopatible with the theme options in HA now? I am confused :slight_smile:

Because I am not using card-modder or anything, just the new options in the theme

idk, I would say that it’s maybe too compatible lol, it respects the new theme option and doesn’t override it.
This is the intended behaviour of the group option, in order to be able to use the card inside cards like the entities card, vertical-stack-in-card, vertical-style-card without having huge paddings.

We could force border-radius: 0; with the group option, but not sure if we would want that.

Is there a way to show X axis(the time) and Y axis (data) iin the graph like the stock graph?

1 Like

No /10chars

Can this be added in the next update? It will mean a lot for me! Thanks!