From 0b2aff61bbd8d3966fdd9c718e8f49ecc171edae Mon Sep 17 00:00:00 2001 From: squirtbrnr <35356217+squirtbrnr@users.noreply.github.com> Date: Mon, 16 Jul 2018 23:50:56 -0500 Subject: [PATCH] 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 --- homeassistant/components/sensor/waze_travel_time.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/waze_travel_time.py b/homeassistant/components/sensor/waze_travel_time.py index 0b059379c11..79b14c94b88 100644 --- a/homeassistant/components/sensor/waze_travel_time.py +++ b/homeassistant/components/sensor/waze_travel_time.py @@ -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)