Skip to content

Commit 99e3071

Browse files
authored
Add command/wake count to polling process (#76)
* Add command/wake count to polling process Resolves #75 * Remove additional API call - Request counts are now in feed :) * Remove whitespace change
1 parent e4d0393 commit 99e3071

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

custom_components/teslafi/coordinator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ async def _refresh(self) -> TeslaFiVehicle:
104104
assert last_good.vin
105105

106106
self._vehicle.update_non_empty(current)
107+
# Refresh TeslaFi command counts
108+
if (counts := current.get("tesla_request_counter", {})):
109+
self._vehicle.update_non_empty(counts)
107110

108111
LOGGER.debug("Remote data last updated %s", self._vehicle.last_remote_update)
109112

0 commit comments

Comments
 (0)