Lovelace: mini graph card

Sorry, not possible, only two axes are supported at the moment.

Try

.state__value {
  font-weight: bold;
}

Thanks that worked for the state but didn’t change the units to bold. Is there a different one for units?

This should do it

.state__value,
.state__uom {
  font-weight: bold;
}

I ilke your card for its clean and simple view and attach it below other cards for that reason. I’d like to slim it down more by removing the state value, which is frequently also displayed in the other card, but when I do that I can’t see the points data. Is there a workaround?

This is how I do it for my Vacuum:

- platform: history_stats
  name: Vacuum Charging Today
  entity_id: sensor.xiaomi_status
  state: Docked
  type: time
  start: "{{ now().replace(hour=0, minute=0, second=0) }}"
  end: "{{ now() }}"

- platform: history_stats
  name: Vacuum Cleaning Today
  entity_id: sensor.xiaomi_status
  state: Cleaning
  type: time
  start: "{{ now().replace(hour=0, minute=0, second=0) }}"
  end: "{{ now() }}"

entities:
  - color: '#26C281'
    entity: sensor.vacuum_cleaning_today
    font_size: 75
    index: 0
    name: Cleaning
  - color: '#8E44AD'
    entity: sensor.vacuum_charging_today
    font_size: 75
    index: 2
    name: Charging
    show_state: true
hours_to_show: 2
line_width: 2
lower_bound: 0
points_per_hour: 220
smoothing: false
state_map:
  - label: Cleaning
    value: Cleaning
  - label: Charging
    value: Charging
type: 'custom:mini-graph-card'

Screenshot_20200903_021919

Could also show it like this:

or with logbook-card:

3 Likes

Looks great! Thanks

1 Like

Bummer, no dice.

Yeah, please support this. I think it will be cool :3…

Hello, I can’t get it to work …
I installed via hacs. I put in the configuration file:

  mode: yaml```
And in the ui-lovelace.yaml file I put:
```resources:
  - url: /local/community/mini-graph-card/mini-graph-card-bundle.js
    type: module

type: custom: mini-graph-card
  entity: sensor.spa-temperature
  name: LIVING ROOM
  hours_to_show: 168
  points_per_hour: 0.25```
But I have this message: "mapping values ​​are not allowed here in" /config/ui-lovelace.yaml ", line 6, column 9".
They talk to me about recording, etc etc, but I do not understand anything ...

Remove all of that.

Check Configuration / Lovelace Dashboards / Resources has your mini-graph-card resource listed.

Then put this bit of your code in a manual Lovelace card (note the indentation and corrections):

type: 'custom:mini-graph-card'
entities:
  - sensor.spa-temperature
name: LIVING ROOM
hours_to_show: 168
points_per_hour: 0.25

I did, but everything remains blank on the page

Using that exact same config but with one of my sensors:

Are you sure the entity id is correct?

In fact I can tell it is not. Entity id’s can not contain a " - ".

Fix this:

sensor.spa-temperature
          ^

Check the developer tools / states menu if you are not sure what the entity id should be.

not so much for me, it’s “sensor.spa_temperature”. I corrected and still have a blank page. And yes this entity does exist.

Post a (cropped) screen shot of your card config.

ui-lovelace.yaml code?

Exactly the same as my screen shot above.

I have to reactivate the original interface. Because I changed the configuration.yaml to use the ui-lovelace.yaml file?

No don’t do that. I did not realise you were using yaml mode. Sorry.

Pasting the config up to the view level will do.

without ui-lovelace.yaml

and the code ui-lovelace.yaml