Raise ConfigEntryNotReady when there is no _id in the Tractive data (#118467)

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
This commit is contained in:
Maciej Bieniek 2024-05-30 11:00:36 +02:00 committed by GitHub
parent 06251d403a
commit 9bd1c408bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,6 +148,13 @@ async def _generate_trackables(
tracker.details(), tracker.hw_info(), tracker.pos_report()
)
if not tracker_details.get("_id"):
_LOGGER.info(
"Tractive API returns incomplete data for tracker %s",
trackable["device_id"],
)
raise ConfigEntryNotReady
return Trackables(tracker, trackable, tracker_details, hw_info, pos_report)