We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b89ab2 commit 9c3b22eCopy full SHA for 9c3b22e
1 file changed
custom_components/stromer/stromer.py
@@ -203,11 +203,8 @@ async def stromer_reset_trip_data(self) -> None:
203
204
headers = {"Authorization": f"Bearer {self._token}"}
205
res = await self._websession.delete(url, headers=headers)
206
- ret = json.loads(await res.text())
207
- log = "API reset trip status: %s" % res.status
208
- LOGGER.debug(log)
209
- log = "API reset trip returns: %s" % ret
210
+ if ret.status != 204:
+ raise ApiError
211
212
async def stromer_call_api(self, endpoint: str) -> Any:
213
"""Retrieve data from the API."""
0 commit comments