mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Handle connection issues with Traccar (#78624)
This commit is contained in:
parent
98dd84f535
commit
0b4e4e81d4
@ -11,6 +11,7 @@ from pytraccar import (
|
||||
GeofenceModel,
|
||||
PositionModel,
|
||||
TraccarAuthenticationException,
|
||||
TraccarConnectionException,
|
||||
TraccarException,
|
||||
)
|
||||
from stringcase import camelcase
|
||||
@ -238,6 +239,9 @@ class TraccarScanner:
|
||||
except TraccarAuthenticationException:
|
||||
_LOGGER.error("Authentication for Traccar failed")
|
||||
return False
|
||||
except TraccarConnectionException as exception:
|
||||
_LOGGER.error("Connection with Traccar failed - %s", exception)
|
||||
return False
|
||||
|
||||
await self._async_update()
|
||||
async_track_time_interval(self._hass, self._async_update, self._scan_interval)
|
||||
|
Loading…
x
Reference in New Issue
Block a user