From 74dd252a1987a639549911c393186a4008df2590 Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Mon, 22 Jul 2019 10:48:25 +0200 Subject: [PATCH] Potential fix platform not found in 0.96.x --- custom_components/here_travel_time/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/here_travel_time/sensor.py b/custom_components/here_travel_time/sensor.py index d75e050..1deb405 100644 --- a/custom_components/here_travel_time/sensor.py +++ b/custom_components/here_travel_time/sensor.py @@ -3,7 +3,6 @@ import logging import re -import herepy import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA @@ -273,6 +272,7 @@ class HERETravelTimeData(): def __init__(self, origin, destination, app_id, app_code, travel_mode, traffic_mode, route_mode, units): """Initialize herepy.""" + import herepy self.origin = origin self.destination = destination self.travel_mode = travel_mode @@ -290,6 +290,7 @@ def __init__(self, origin, destination, app_id, app_code, travel_mode, def update(self): """Get the latest data from HERE.""" + import herepy if self.traffic_mode: traffic_mode = TRAFFIC_MODE_ENABLED else: