Delay setup of waze travel time component (#15455)

* delay setup of component

Copied the necessary lines of code from the google travel time component to fix the setup delay in waze travel time component.  Previously it was only watching the homeassistant start event on the bus, but doing nothing with it.

* Update waze_travel_time.py

* Update waze_travel_time.py
This commit is contained in:
squirtbrnr 2018-07-16 23:50:56 -05:00 committed by Aaron Bach
parent ad4cba70a0
commit 0b2aff61bb

View File

@ -64,8 +64,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
sensor = WazeTravelTime(name, origin, destination, region,
incl_filter, excl_filter)
add_devices([sensor], True)
add_devices([sensor])
# Wait until start event is sent to load this component.
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, sensor.update)