Fix waze_travel_time component startup (#16465)
* Fix waze_travel_time component startup * Remove @Throttle decorator as per pvizelli's request * Make the linting gods happy again
This commit is contained in:
parent
ce06229c42
commit
cff9b1bf7e
1 changed files with 2 additions and 3 deletions
|
@ -16,7 +16,6 @@ from homeassistant.const import (
|
|||
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']
|
||||
|
||||
|
@ -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):
|
||||
|
@ -182,7 +182,6 @@ class WazeTravelTime(Entity):
|
|||
|
||||
return friendly_name
|
||||
|
||||
@Throttle(SCAN_INTERVAL)
|
||||
def update(self):
|
||||
"""Fetch new state data for the sensor."""
|
||||
import WazeRouteCalculator
|
||||
|
|
Loading…
Add table
Reference in a new issue