Skip to content

Commit 66c4206

Browse files
committed
Bump down logger level of some warnings.
1 parent dfecdce commit 66c4206

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

custom_components/teamtracker/hockeytech.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,12 @@ async def async_call_hockeytech_api(hass, params, sensor_name, league_id) -> dic
425425
if r.status == 200:
426426
text = await r.text()
427427
else:
428-
_LOGGER.warning(
428+
_LOGGER.debug(
429429
"%s: HockeyTech API returned status %s", sensor_name, r.status
430430
)
431431
return {"ht_data": None, "url": url}
432432
except (aiohttp.ClientError, TimeoutError) as e:
433-
_LOGGER.warning("%s: HockeyTech API call failed: %s", sensor_name, e)
433+
_LOGGER.debug("%s: HockeyTech API call failed: %s", sensor_name, e)
434434
return {"ht_data": None, "url": url}
435435

436436

@@ -446,7 +446,7 @@ async def async_call_hockeytech_api(hass, params, sensor_name, league_id) -> dic
446446
try:
447447
ht_data = json.loads(text)
448448
except json.JSONDecodeError as e:
449-
_LOGGER.warning("%s: HockeyTech response not JSON: %s", sensor_name, e)
449+
_LOGGER.debug("%s: HockeyTech response not JSON: %s", sensor_name, e)
450450
ht_data = None
451451

452452
return {

custom_components/teamtracker/sensor.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ async def async_setup_platform(
8080
except vol.Invalid:
8181
_LOGGER.warning("%s: `league_id` must be valid (one of %s)", sensor_name, league_ids)
8282
_LOGGER.error("%s: Support for invalid `league_id` in YAML was deprecated in v0.7.6. Correct config prior to next upgrade.", sensor_name)
83-
async_create(
84-
hass,
85-
f"{sensor_name} Error: `league_id` must be valid (one of {league_ids})",
86-
"Team Tracker",
87-
DOMAIN,
88-
)
8983
return
9084

9185
# Raise an exception if the league ID is XXX and the sport or league path is not
@@ -97,7 +91,6 @@ async def async_setup_platform(
9791
"Must specify sport and league path for custom league (league_id = XXX)"
9892
)
9993
_LOGGER.warning("%s: %s", sensor_name, error_msg)
100-
async_create(hass, f"{sensor_name} Error: {error_msg}", "Team Tracker", DOMAIN)
10194
return
10295

10396
league_id = config[CONF_LEAGUE_ID].upper()

0 commit comments

Comments
 (0)