Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
Potential fix platform not found in 0.96.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Jul 22, 2019
1 parent f1f28ad commit 74dd252
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/here_travel_time/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import re

import herepy
import voluptuous as vol

from homeassistant.components.sensor import PLATFORM_SCHEMA
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 74dd252

Please sign in to comment.