Skip to content

Commit

Permalink
This makes the vasttrafik platform stop spamming the logs with warnin…
Browse files Browse the repository at this point in the history
…gs (home-assistant#19792)

* This makes the vasttrafik platform stop spamming the logs with warrnings

* Forcing build
  • Loading branch information
kennedyshead authored and fabaff committed Jan 6, 2019
1 parent 1e18a2c commit c96778c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions homeassistant/components/sensor/vasttrafik.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -116,7 +117,7 @@ def device_state_attributes(self):
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')
Expand All @@ -143,5 +144,5 @@ def update(self):
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()

0 comments on commit c96778c

Please sign in to comment.