This sensor displays the estimated completion timestamp for vehicle charging, as suggested in issue #318. This sensor aims to provide users with an accurate prediction of when their car's charging process will be completed, enhancing the overall user experience and providing valuable information for planning purposes.
Implementation Details
The sensor calculates the estimated charging completion timestamp based on the last_update timestamp . The last_update serves as an anchor point for this calculation.
It utilizes the remaining_charge_time to estimate when the charging will be completed from the last known state update received from the vehicle.
It's important to note that once the remaining_charge_time reaches 0, the sensor will display the timestamp of the last update received from the vehicle. If the vehicle checks-in later, while the charge time is still 0, the new timestamp will be the time it checked-in and no longer the time the vehicle finished charging.
Considerations
This approach ensures that the sensor remains functional and provides an estimate based on the latest available data, but it may not always reflect the exact moment the charging finished if updates from the vehicle are delayed or if the charging process concludes shortly after the last update.
Users should be aware that the estimated completion timestamp is just that - an estimate. Delays in data transmission or changes in charging speed can affect the accuracy of this estimate.
Rationale
This enhancement addresses a specific need/gap identified in issue #318, where the user expressed a desire for a calculated point in time, vs the existing remaining_charge_time which only displays an int of minutes. The gap in the previous sensor is that if the vehicle isn't updated, or "active polling" is turned off or has a large interval, the int minutes will not update regularly and for instance, could remain as 80 minutes even if the charging has already stopped.
This again, reduces the need for frequent active polling.
this PR is dependent upon PR #334
New Sensor - Charging Complete Time
sensor.charging_complete_time
device_class: timestamp
This sensor displays the estimated completion timestamp for vehicle charging, as suggested in issue #318. This sensor aims to provide users with an accurate prediction of when their car's charging process will be completed, enhancing the overall user experience and providing valuable information for planning purposes.
Implementation Details
last_update
timestamp . Thelast_update
serves as an anchor point for this calculation.remaining_charge_time
to estimate when the charging will be completed from the last known state update received from the vehicle.remaining_charge_time
reaches 0, the sensor will display the timestamp of the last update received from the vehicle. If the vehicle checks-in later, while the charge time is still 0, the newtimestamp
will be the time it checked-in and no longer the time the vehicle finished charging.Considerations
Rationale
This enhancement addresses a specific need/gap identified in issue #318, where the user expressed a desire for a calculated point in time, vs the existing
remaining_charge_time
which only displays anint
of minutes. The gap in the previous sensor is that if the vehicle isn't updated, or "active polling" is turned off or has a large interval, theint
minutes will not update regularly and for instance, could remain as 80 minutes even if the charging has already stopped.This again, reduces the need for frequent active polling.