diff --git a/teslajsonpy/connection.py b/teslajsonpy/connection.py index 41d3b658..c206dbda 100644 --- a/teslajsonpy/connection.py +++ b/teslajsonpy/connection.py @@ -122,6 +122,10 @@ async def post(self, command, method="post", data=None): auth = await self.refresh_access_token( refresh_token=self.sso_oauth.get("refresh_token") ) + elif self.refresh_token: + auth = await self.refresh_access_token( + refresh_token=self.refresh_token + ) if auth and all( ( auth.get(item)