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

vehicle Time charging complete sensor incorrect #374

Closed
purcell-lab opened this issue Nov 28, 2022 · 2 comments · Fixed by #375
Closed

vehicle Time charging complete sensor incorrect #374

purcell-lab opened this issue Nov 28, 2022 · 2 comments · Fixed by #375

Comments

@purcell-lab
Copy link
Contributor

Version of the custom_component

v3.3.1

Describe the bug

Time left attribute reports correct 1.33 hrs
new Time charging complete sensor report 13 hours which is incorrect.

image

@purcell-lab purcell-lab changed the title vehicle time charge complete sensor incorrect vehicle Time charging complete sensor incorrect Nov 28, 2022
@alandtse
Copy link
Owner

Make sure HA has your correct timezone. We're using that to determine what now() is. It's possible that the sensor should return in UTC instead of locale timeone, but I haven't looked.

@purcell-lab
Copy link
Contributor Author

My timezone is GMT+10 and is set correctly in HA.

Screenshot_20221128-185031

So it could be the UTC offset that is missing.

alandtse pushed a commit that referenced this issue Nov 29, 2022
Looks like HA stores all times in UTC then converts that value to the user's timezone. So using utcnow() instead of now() fixes the timezone issue with this sensor.

closes #374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants