teslamateapi: EndDate Can Be NULL, Causing Failed Charges Endpoint

It’s possible to have incomplete charges with missing EndDate. These aren’t always valid objects either, but they shouldn’t prevent the Charges endpoint from providing data. I believe this can happen when TeslaMate is offline when the charging cycle ends. I am not sure if it’s also possible if the vehicle is actively charging.

Error: sql: Scan error on column index 2, name "end_date": converting NULL to string is unsupported

Pull Request https://github.com/tobiasehlert/teslamateapi/pull/40

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Screen Shot 2021-05-04 at 9 14 09 AM Here's the data for about 10 charges. It's clear that id = 2 and 3 are invalid charges. I'm going to submit a new PR, let me know what you think

For my last few issues, I created issues and pull requests separately. Please let me know if this isn’t standard practice!

Totally fine with separated issues and pull requests 😃