Replies: 8 comments 1 reply
-
This is quite strange. Everything is fine when using the Homeassistant app. But on the web there is just one value for the last month. I have tried two different computers so it is not related to web browser or anything like that. |
Beta Was this translation helpful? Give feedback.
-
'''
series:
- entity: sensor.rain_month
statistics:
type: change
period: day
align: start
'''
Your sensor is most likely a long term statistics (LTS). = It has an
attribute of state_class: total or state_class: total_increasing or
state_class: measurement. Having this attribute makes that statistical
values, calculated from the original states, are stored into the statistics
table. The original states captured will however still be removed after the
standard cleanup period like they are for all sensors (by default 10 days).
For the apex chart card to show any values older than the cleanup period
(i.e. read the values from that statistics table) you need to instruct
apexchart card to retrieve the series as 'change over a period' according
the example above when state_class is either of the both total classes. Use
type: avg, min or max when your entity has state_class: measurement.
Op za 28 dec 2024 21:03 schreef bengtner ***@***.***>:
… This is quite strange. Everything is fine when using the Homeassistant
app. But on the web there is just one value for the last month. I have
tried two different computers so it is not related to web browser or
anything like that.
Screenshot.2024-12-28.08.47.46.png (view on web)
<https://github.com/user-attachments/assets/4abd2308-925a-42ed-9764-c3591cdd922b>
Screenshot_20241228-210200.png (view on web)
<https://github.com/user-attachments/assets/9ad4144c-a583-481b-8a19-a364750547b3>
—
Reply to this email directly, view it on GitHub
<#832 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANKYDUTJLGCBNSKQYCQQAD2H37Y7AVCNFSM6AAAAABUFW3E5KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNRYGY3TKMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: <RomRider/apexcharts-card/repo-discussions/832/comments/11686753@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks! Yes, the sensor is a utility meter, i.e long term statistics. Your advice solved my issue. I have never managed to figure this out myself. Especially since the behaviour was different with the app frontend. |
Beta Was this translation helpful? Give feedback.
-
Oops, I was too quick with my conclusion. The proposed addition of a statistics block in the configuration did a change. I get bars for several months. However, the values are completely wrong. Just a fraction of the monthly total. However, in the HA app everthing is fine. Multple bars and the values are reasonable. ??? |
Beta Was this translation helpful? Give feedback.
-
Add a group_by: func: sum or something similar. The statistics: key plus it's subs tells the card to retrieve the values from the statistics table instead of from the states. The rest of the data selection for the graph however remains the same, i.e. you still need to group_by etc per the grouping that you want your graph to show. |
Beta Was this translation helpful? Give feedback.
-
I do have a group by: item in the yaml.
I don't get this. The HA app presents everything correctly without any statistics: item. |
Beta Was this translation helpful? Give feedback.
-
Not completely sure, but I think you can change the period: day into
period: hour and the func: max into func: sum
Op wo 1 jan 2025 16:21 schreef bengtner ***@***.***>:
… I do have a group by: item in the yaml.
type: custom:apexcharts-card
graph_span: 12month
header:
show: true
title: Regn/månad
show_states: false
span:
end: month
series:
- entity: sensor.rain_month
color: aqua
type: column
statistics:
type: change
period: day
align: start
group_by:
func: max
duration: 1month
yaxis:
- min: 0
I don't get this. The HA app presents everything correctly without any
statistics: item.
—
Reply to this email directly, view it on GitHub
<#832 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANKYDWMLWHEXH5H54RGIIT2IQBVFAVCNFSM6AAAAABUFW3E5KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZRGA3DOMY>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
That I cannot explain either...
Op do 2 jan 2025 16:40 schreef bengtner ***@***.***>:
… I don't get why I need to make adjustments like this since everything
looks perfect on my mobile in the HA app.It doesn't make sense to change
the way data is gathered depending on which device this is presented.
—
Reply to this email directly, view it on GitHub
<#832 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANKYDX477DO2EQPG4ETTZT2IVMXXAVCNFSM6AAAAABUFW3E5KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZRHAYTIMI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a problem with monthly statistics of a utility meter measuring rain fall. I have similar cards displaying daily and weekly statistics and those work fine. However, my month graph just presents last month readings. Here is my configuration of the card.
The utility meter sensor_month seems OK.
Any help on this is appreciated!
(I have made a post in HA Frontend forum about this as well. But it seems like this one could be more appropriate.)
Beta Was this translation helpful? Give feedback.
All reactions