I still think there is something odd with the state_map in my opinion.
I have now been using the input_number and it is working fine, but I also left the binary sensor there to check it and start to use it when the time was right… and now that binary sensor it’s apparently working fine, but when I add it to the graph to replace the input_number, it does not appear, feels like the on/off is not transalated to 1/0
aggregate_func: max
entities:
- entity: sensor.hourly_gas
hour24: true
group_by: hour
hours_to_show: 24
line_width: 2
name: Gas consumption
points_per_hour: 60
show:
graph: bar
labels: true
type: 'custom:mini-graph-card'
When I compare to the normal history graph, I could see abnormalities, so I opened the same graph in a new private tab in FF, then I get a correct graph. Here an example:
Original graph:
I have recreated the history graph of a climate component. But I think I have a refresh problem. Many times when I open the panel that contains the graph, it shows like this, (green graphs area is more on the left that should be).
when I press F5 in my browser, the graph is already updated correctly.
You can see the difference of the green part, it seems to show old data.
Still not getting it to work? I can’t reproduce that issue unfortunately.
It’s however not really optimal that we cache the mapped values, if the user ever want to change the state_map structure later the cached data will not be remapped.
@dutchguy, @DendelX, @tom_l
Thanks for your reports.
Can hopefully make some progress on those issues during the weekend, one of them should be fairly easy to solve, the other one could require some experimentation.
Basically if I use the input_number I did create originally it does work perfectly.
If I use the binary_sensor you suggested it doesn’t.
I have checked and the binary sensor it is correctly setting on/off depending on the tod rules, but the graph it doesn’t seems to be “translating” on/off to 1/0, therefore it is not showing the graph when I use that…
Hi Kalkih, I have to report another bug. If you compare both graphs I attached before, at begining you can see that first green area is different. I have seen that some times, this graph and blue one (second and third entities) mantains fixed a value instead real values. This is always with the oldest data that graph shows, and not is fixed refreshing browser.
In this example the correct is the first graph attached. If you need more information tell me.
Sorry, I’m not entirely sure what you mean.
Could you please explain the issue one more time in more detail?
Please open an issue regarding this on github, it’s easier for me to track it that way.
Thanks!
Has anyone been able to use the tap_action option? This was introduced in v0.7.0.
I’m trying to open a popup with Browser Mod on the tap_action as shown below, but it isn’t working. It’s simply opening the more-info view (default behaviour I guess).
I have also removed the more-info-card which sound pointless for me, you should use the “entities” card and list the entities you want to show in the popup, so for instance my whole card looks like this:
This also does not work. It just performs the default, which is more-info.
On another note, thanks for your tip about the entities card. I was actually already thinking of a way to filter some attributes which are on the more-info-card. So, thanks for that. Definitely going to use that.
Sounds like your browser isn’t loading the latest version of the card.
Make sure you’ve updated the card and the old version isn’t loading from cache.
If using HACS, check this: https://github.com/kalkih/mini-graph-card/issues/169
Oh, wow. Thanks for pointing that out! That was indeed it.
I am using HACS and even though I’ve seen you say this to some other people earlier in this thread I never thought to look for this issue myself since everything worked fine up until I wanted to use the popup from Browser Mod.
Also @SeLLeRoNe earlier I said that service: browser_mod.popup was working fine for me, but in fact it didn’t. Because I wasn’t using the correct resource, it looked like it was working, but it wasn’t. I was using an older version of Browser Mod. So, I also updated to the latest version of that and started to use the new configuration (service: browser_mod.popup over service: browser_mod.command and a separate command: popup) and everything is working fine now.
@kalkih thanks for an awesome card!
I use it to show graph over my energy consumtion.
Is it possible to group the bars weekly? I manage only to group the bars as last 7 days, not as week (mon-sun). Is that possible, and if so, how? Want also to start to show the bars at the 1. of each month, so it`s more logical to the values I use.
- type: type: custom:mini-graph-card
entities:
- entity: sensor.energy_daily
name: Energy consumption
hours_to_show: 168
aggregate_func: max
group_by: date
show:
graph: bar
should be:
- type: custom:mini-graph-card
entities:
- entity: sensor.energy_daily
name: Energy consumption
hours_to_show: 168
aggregate_func: max
group_by: date
show:
graph: bar
couldn’t find the edit button on the GitHub page, so hope you don’t mind me reporting here.
Hi Tom, sorry for the late reply, only just getting back to this now. I already have some style config for this card and with a bit of playing around I couldn’t get it working. How can I uses both your style code and my existing style code for this card? I tried simply having my code under your example (without having ‘style’ twice) but HA wasn’t happy…