From d2ca1101be5e3d71b90cc4e123a39f1ae0d614d8 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 12 Nov 2023 06:42:01 -0900 Subject: [PATCH] Fixed logger call --- custom_components/teamtracker/event.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_components/teamtracker/event.py b/custom_components/teamtracker/event.py index 64bf3d8..222dda6 100644 --- a/custom_components/teamtracker/event.py +++ b/custom_components/teamtracker/event.py @@ -76,8 +76,12 @@ async def async_process_event(values, sensor_name, data, sport_path, league_id, if not found_competitor: date_range_message = f"{first_date.strftime('%Y-%m-%dT%H:%MZ')} and {last_date.strftime('%Y-%m-%dT%H:%MZ')}" values["api_message"] = f"API_LIMIT hit. No competition found for '{team_id}' between {date_range_message}" if limit_hit else f"No competition scheduled for '{team_id}' between {date_range_message}" - _LOGGER.debug("%s: {'API_LIMIT hit' if limit_hit else 'No competitor information'} '{search_key}' returned by API", sensor_name, search_key) - + _LOGGER.debug( + "%s: API_LIMIT hit (%s). No competitor information '%s' returned by API", + sensor_name, + API_LIMIT, + search_key, + ) return values