Lovelace: mini graph card

I am wanting to plot 2 entities on this card. One is measured in percent (0-100) and the other presence (home/away).
Is it possible to get these on the same graph using a secondary Y?
I have tried all sorts of combinations unsucessfully.
Here is my card:

entities:
  - entity: sensor.mf_confidence
    name: BTLE
  - color: grey
    entity: device_tracker.phone_milo_unifi
    name: Unifi
    y_axis: secondary
hours_to_show: 24
name: Milo Presence
points_per_hour: 4
line_width: 2
hour24: true
smoothing: false
show:
  icon: false
  state: false
state_map:
  - label: Home
    value: home
  - label: Away
    value: away
type: 'custom:mini-graph-card'

no (not yet), haven’t had a reason to do so. Will check that out, thanks for the link.

I see, I checked, but they are sold out and the new sensor hasn’t arrived yet :wink: will keep a eye on it though, might be useful, thanks

It now started working on its own! :thinking:

Would you mind sharing the outcome? I am curios :slight_smile:

Also, how did you configure Bluetooth? :slight_smile:

Great, what could happen when using state_map is that an “older” state_map configuration gets cached, so if you e.g. initially specify an invalid/broken state_map and then correct it later, the old one will probably be cached causing the line not to render as expected. This should fix itself with time as the sensor is updated but it’s also force cleared when changes to the hours_to_show option is made and the browser window is refreshed.

You can find them cheaper on Ali Express :wink:

Almost! They don’t have the HDC1080 component on though for the temperature and humidity though!

Nice tip! Thanks!

I am just playing about with a raspberry pi using Monitor.sh program on it. It takes a bit of setting up but the results are promising so far


Of course
 Except it broke again :man_facepalming:

I see, I looked for the sensor number CCS811 :slight_smile:
I am sure that even if those are not the right one, you can find the right one on Aliexpress on a cheaper price :slight_smile:

I did look into monitor.sh long time ago and yes, it does look a bit of a mess to configure

I guess I’ll have to do it at some point


I have noticed on my test that the state_map wasn’t working
 at least not all the time
 So for night/day I do use a template sensor, you might want to use the same

Just make it return 1 or 0 depending if it’s home or away :wink:

Everything is cheaper from Aliexpress!

Yes I did think of this, but I was sure there was a way to do this without, therfore my OCD would not let me do it! :rofl:

Hello everyone,
I got two questions for you.
Is it possible to group by week or by month?
Is it possible to display multiple entities on a bar chart?
I use utility_meter integration to know my energy consumption at home for five different power sensors.
I would love to see per week/month the usage of each sensor and compare them to each other.
Anybody knows how to achieve that?

Hello!

No, you could group by a rolling seven days period but I guess you want it to be sunday-sunday.
For a rolling 7-days set points_per_hour to 0.005952380952381 (1/168) and hours_to_show to 168 times amount of weeks you want to display.

Yes, you can list several entities under the entities option.

Ok, thank you @kalkih. Is there any other bar chart for Lovelace?

You’re welcome, this is the closest I know of

hi,in last update(0.9.0) my config is broked:

          show:
            legend: true
            icon: false
            graph: line 
            name_adaptive_color: true
            extrema: true

there are changues about this?
extrema and graph option,they disappear from the card

Thanks, broken extrema is now fixed in 0.9.1.

(The broken extrema caused the graph to not render properly as well)

1 Like

Thanks to you for your work

1 Like