-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the odometer suitable as a long-term statistic #213
Comments
Seems reasonable. We're currently setting
Settings Note that if all you want is a graph with recent values I'd recommend looking into mini graph card and apex charts card, which aren't tied into the native HA statistics stuff. E.g. minigraph with the odometer sensor (so without
|
I made my own "helper" in configuration.yml file like this
I think this odometer needs state_class: total_increasing attribute. This works fine for me. In Tesla integration the odometer contains this total_increasing |
I would like to be able to plot a statistics bar chart of the daily mileage based on the odometer reading but I can't plot the "change" in a statistics chart, it only gives the total Odometer. I suspect this is what the original poster was also referring to. If there is a way of doing this with the current code in HA then I am happy to learn how to do it. |
@CaptSB , as mentioned previously, take a look at the ApexCharts card. type: custom:apexcharts-card
graph_span: 7d
series:
- entity: sensor.tmxxxxxxxxx_odometer
type: column
group_by:
func: diff
duration: 1day @MaZa78 @mthmulders , setting |
That is perfect!
I now have the daily mileage chart I wanted!
Many thanks
Richard
Sent from Gmail Mobile
…On Sat, 20 Jan 2024 at 20:48, Fabrice Devaux ***@***.***> wrote:
@CaptSB <https://github.com/CaptSB> , as mentioned previously, take a
look at the ApexCharts card.
type: custom:apexcharts-cardgraph_span: 7dseries:
- entity: sensor.tmxxxxxxxxx_odometer
type: column
group_by:
func: diff
duration: 1day
image.png (view on web)
<https://github.com/skodaconnect/homeassistant-skodaconnect/assets/785424/e28e7682-b940-4880-a6cc-05bd84e908f4>
@MaZa78 <https://github.com/MaZa78> @mthmulders
<https://github.com/mthmulders> , setting state_class: total_increasing
for the odo sensor sounds like the right thing to do. I'll take a look when
I have time but feel free to submit a PR.
—
Reply to this email directly, view it on GitHub
<#213 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A64N7OUKWTFJ5CISXHYNC7TYPQUQHAVCNFSM6AAAAAA5ENDFRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGI3DCNRZGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Is this request implemented now? I read from the pull request that it is merged, but my odometer does not have long term statistics. Running version 1.2.12 It was merged into main on 13th of april, and it was listed as part of 1.2.10, but my inspection says:
Where is the state_class? |
Yeah I think the fix is wrong. The attr for the odometer sensor seems to be |
Is your feature request related to a problem? Please describe.
I'd love to see a chart of the mileage of my Skoda car. I thought I would need a Statistics Graph Card for that, but it doesn't show the odometer as a source.
Describe the solution you'd like
The Expected data source not listed page suggests that the
state_class
of the entity may not be correct.Describe alternatives you've considered
n/a.
Additional context
I'm quite a starter when it comes to using Home Assistant - so if my understanding of how HA or this Skoda integration works is insufficient, I'm definitely open for alternative approaches.
The text was updated successfully, but these errors were encountered: