mbillow / ha-chargepoint

Home Assistant ChargePoint EV Charger Integration
MIT License
44 stars 6 forks source link

“Last connected at” doesn’t update #33

Closed snairolf closed 4 months ago

ultimateguy commented 8 months ago

+1 Same issue here

dmzimmerman commented 7 months ago

I see what I assume is the same issue. It says my "last connected at" is back in February, but also says it's online now, and I know for a fact that it's lost wifi connectivity at least once between then and now.

sxdjt commented 6 months ago

+1

It seems to work properly when plugging in, but some time after the charging cycle is complete, it goes to "Unknown" status and stops updating.

Screenshot 2023-12-29 at 02 31 32
sxdjt commented 6 months ago

The "Last Connected" entry in the logbook says it was in 1969, which may be a problem?

'Last Connected At changed to December 31, 1969 at 4:00 PM 2:34:48 AM - 3 minutes ago'

Screenshot 2023-12-29 at 02 37 09

FWIW, here is my card configuration:

type: entities
entities:
  - entity: sensor.cph50_charger_state
    secondary_info: last-updated
  - entity: sensor.cph50_charge_cost
    secondary_info: last-updated
  - entity: sensor.cph50_charging_cable
    secondary_info: last-updated
  - entity: sensor.cph50_charging_status
    secondary_info: last-updated
  - entity: sensor.cph50_energy_output
    secondary_info: last-updated
  - entity: sensor.cph50_miles_hour_added
    secondary_info: last-updated
  - entity: sensor.cph50_miles_added
    secondary_info: last-updated
  - entity: sensor.cph50_network
    secondary_info: last-updated
  - entity: sensor.cph50_power_output
    secondary_info: last-updated
title: Car Charger
state_color: true

...and the info on the Chargepoint from the integration config screen:

CPH50-Hardwire-L23
by ChargePoint
Firmware: 5.5.3.13 
mbillow commented 6 months ago

Yah, it looks like the CharePoint API stopped returning the last time the charger sent a heartbeat/connected.

If someone wants to make a PR to remove the sensor, I’ll happily review and merge. I’m not sure if HA gives us an API to clean up the old sensor, but that would be great as well.

sxdjt commented 6 months ago

Caveat: I am not a developer. In any way, shape, or form. I hack at things until they "work". I've probably messed up more than I've ever fixed.

That being said, I've created https://github.com/mbillow/ha-chargepoint/compare/main...sxdjt:ha-chargepoint:main . Not even sure that is the right way of doing things.

mbillow commented 4 months ago

Removed in lasted version, closing this out.