Skip to content
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

Timeline: fix kWh values and column layout for miles (#3846) #3847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdwalker
Copy link
Contributor

Add the kWh multiplication needed for driving and parking when using miles
Use the same index value for the Range Diff column so the layout is the same with miles or kilometers

Add the kWh multiplication needed for driving and parking when using miles
Use the same index value for the Range Diff column so the layout is the same with miles or kilometers
Copy link

netlify bot commented Apr 16, 2024

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 20a2c5a
🔍 Latest deploy log https://app.netlify.com/sites/teslamate/deploys/661deb03a2bf83000851a643
😎 Deploy Preview https://deploy-preview-3847--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cwanja cwanja linked an issue Apr 16, 2024 that may be closed by this pull request
1 task
@DrMichael
Copy link
Collaborator

May I propose to use convert_km instead of CASE in the SQL statement? Just to be consistent.

@JakobLichterfeld JakobLichterfeld added the area:dashboard Related to a Grafana dashboard label Apr 17, 2024
@sdwalker
Copy link
Contributor Author

sdwalker commented Apr 18, 2024

May I propose to use convert_km instead of CASE in the SQL statement? Just to be consistent.

convert_km divides by 1.60934 so the proper fix for charging looks to be to not use convert_km at all

-convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS "kWh",

+(end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC * efficiency AS "kWh",

Still looking at how to fix the parking query

convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS "kWh",

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It could be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dashboard Related to a Grafana dashboard Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeline kWh is incorrect for miles
3 participants