TWCManager icon indicating copy to clipboard operation
TWCManager copied to clipboard

Dampen some useless commands

Open MikeBishop opened this issue 1 month ago • 2 comments

This targets the two useless commands I identified in #591; if others are noted, I can add them. It's based on #571, since it needs some of the additional state that was picked up there; I'll retarget to main once that's merged.

  • When charging stops (as reported by the TWC), stopAskingToStartCharging is set on the last-connected vehicle if that vehicle last reported an estimated time-to-completion of less than five minutes.
  • Before sending a start-charge command, the vehicle's last-reported charge status is checked. No start/stop command is sent if the vehicle reported being disconnected or done charging, and no charge command is sent if the vehicle reported that it was already charging.

It now also eliminates an additional useless command I discovered from my tesla-proxy logs:

  • If the charge limit is being set to the same limit the car already reports, no charge limit command is sent.

MikeBishop avatar Jan 14 '25 01:01 MikeBishop