mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
This makes the vasttrafik platform stop spamming the logs with warnings (#19792)
* This makes the vasttrafik platform stop spamming the logs with warrnings * Forcing build
This commit is contained in:
parent
1e18a2c679
commit
c96778c82a
@ -59,6 +59,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
planner = vasttrafik.JournyPlanner(
|
||||
config.get(CONF_KEY), config.get(CONF_SECRET))
|
||||
sensors = []
|
||||
|
||||
for departure in config.get(CONF_DEPARTURES):
|
||||
sensors.append(
|
||||
VasttrafikDepartureSensor(
|
||||
@ -116,7 +117,7 @@ class VasttrafikDepartureSensor(Entity):
|
||||
def state(self):
|
||||
"""Return the next departure time."""
|
||||
if not self._departureboard:
|
||||
_LOGGER.warning(
|
||||
_LOGGER.debug(
|
||||
"No departures from %s heading %s",
|
||||
self._departure['name'],
|
||||
self._heading['name'] if self._heading else 'ANY')
|
||||
@ -143,5 +144,5 @@ class VasttrafikDepartureSensor(Entity):
|
||||
direction=self._heading['id'] if self._heading else None,
|
||||
date=datetime.now()+self._delay)
|
||||
except self._vasttrafik.Error:
|
||||
_LOGGER.warning("Unable to read departure board, updating token")
|
||||
_LOGGER.debug("Unable to read departure board, updating token")
|
||||
self._planner.update_token()
|
||||
|
Loading…
x
Reference in New Issue
Block a user