alandtse / tesla

Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
Apache License 2.0
588 stars 100 forks source link

perf: avoid creating a task for debounced listener update #990

Closed bdraco closed 3 months ago

bdraco commented 3 months ago

Nothing was being awaited in _debounced so it could be a normal function decorated with @callback to run in the event loop and did not need to be a coro. This avoids creating a task when the async_call_later fires

Note as with #989, I don't use mqtt/teslamate so I have no real world test case for this