My attempt to visualise a bayesian sensor including (most of) its observations in a single graph.
I use this code to display max value per day :
title: test
panel: true
cards:
- type: custom:mini-graph-card
entities:
- entity: sensor.dsmr_day_consumption_electricity1
aggregate_func: max
name: Max
color: #e74c3c
name: energy_consumption_per_day (last week)
hours_to_show: 168
group_by: date
However for every date the same value is shown, while none of the dates has a similar maximum value
To investigate whether I did something wrong I load the database in DBbrowser for sqllite and used this sql:
select substr(last_changed,1,10) as date, max(cast(state as decimal)),entity_id from states
where entity_id = âsensor.dsmr_day_consumption_electricity1â
group by substr(last_changed,1,10) ;
the results are in the image.
I do not understand what I am doing wrong. Only reason I can think of is that some states in the database have the value âunknownâ.
I posted a similar topic before but I think this make things more clear
SOLVED: I had a corrupt database
With the standard history-graph card you can click on an entity to hide or show it in the graph (if it is hidden the name is crossed out). Is there any way to do similar with the mini graph card?
I can hover over one of the entities to only show that entity in the graph, but that only works while you hover and it would be nice to be able to easily toggle entities on and off without editing the card each time.
Then how would you bring up the more info-pop-up?
I actually had the tap_action set to none, since I didnât want the more-info card popup (Iâm using it as a replacement for history-graph which doesnât display the more-info when you click on the headings).
Iâd wondered if I could use tap_action to do this (using a set of input_bolleans toggled on tap and templating with card-templater to hide/show the lines) but tap_action is a global option for all entities on the card and canât be set per-entity.
sorry if this has been answered before, it is such a simple question⊠cant find it in the doc under show options, nor here in the community.
can we show a time grid in the mini-graph (very light vertical lines, maybe coinciding with the plot frequency)? my use case: I am trying to find an exact spot in time for 2 different sensors, which I have set as entities in a mini-graph card. A simple time grid would make it easy to find a certain state in on e of these sensors, and find the value for the same time in the other sensor.
thanks for having a look.
Hey @kalkih
Is there any way to template / add a prefix to the current values?
Iâd really love to move the graph name as a prefix to save a little vertical space.
Current load 124w
3V 8w
Etc
Cheers
Is this now possible to have multiple colors? Can you show me your code?
Anyone got a cool example for humidity sensors?
I ordered 3 xiaomi humidity sensors, wanna show those values in a cool way
I do use them differently depending if itâs for the weather view, a specific room view or the house view:
House View (house average + outside value):
Specific room View (only room value):
Weather View (Only external value):
If you want to get the code, you can find it here: https://github.com/SeLLeRoNe/HA-Config
I do use templates for the house and per-room ones, so you might want to check them inside the lovelace/templates and lovelace/views for the weather one (still didnât have the time to move into a template or check if I can use the existing one).
Hope this helps
My code is here: https://github.com/SeLLeRoNe/HA-Config
But it depends on what you mean by multiple colors, if you mean one per-entity then yes, but I think (not sure tho) that the threshold will be commonâŠ
Actually that might be interesting for a FR @kalkih donât hate me please
Thnx for sharing guys
Iâm not using any graphs with thresholds at this time. I see youâve got some good examples from @SeLLeRoNe - mine wouldnât add anything new.
Have fun
HI
How I can change sunrise/sunset to numerical value?
input_number??
Haha, I believe thereâs one open already
Check out template sensor, or the cards state_map
option, see example.
Iâm an idiot. I looked way back in this thread for an example to answer that question and gave up.
Hi, this is an awesome looking card!
I would prefer this over grafana, to keep everything in HA.
One thing, no actually 2, grafana canât do natively are side-by-side bar charts and drill down charts.
- Side-by-side: I would like to aggregate 3 entities by date, and have a bar per date for each entit. Is this possible?
- Drill down: with an date aggregation I would tap on a bar (eg for weeks), and then I would drill down to days for that week.
Thanks for the effort and especially support!
Thank you very much⊠How i miss that exampleâŠ