Skip to content

Commit

Permalink
Fix waze_travel_time component startup (home-assistant#16465)
Browse files Browse the repository at this point in the history
* Fix waze_travel_time component startup

* Remove @Throttle decorator as per pvizelli's request

* Make the linting gods happy again
  • Loading branch information
tsvi authored and pvizeli committed Sep 7, 2018
1 parent ce06229 commit cff9b1b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions homeassistant/components/sensor/waze_travel_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import location
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle

REQUIREMENTS = ['WazeRouteCalculator==0.6']

Expand Down Expand Up @@ -71,7 +70,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([sensor])

# Wait until start event is sent to load this component.
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, sensor.update)
hass.bus.listen_once(
EVENT_HOMEASSISTANT_START, lambda _: sensor.update())


def _get_location_from_attributes(state):
Expand Down Expand Up @@ -182,7 +182,6 @@ def _resolve_zone(self, friendly_name):

return friendly_name

@Throttle(SCAN_INTERVAL)
def update(self):
"""Fetch new state data for the sensor."""
import WazeRouteCalculator
Expand Down

0 comments on commit cff9b1b

Please sign in to comment.