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

Commit

Permalink
revert to top level import and add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Jul 22, 2019
1 parent 74dd252 commit fb8be07
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Platform | Description

## Installation

### Important information for hass.io users on > 0.96.0

If you are using hass.io in a version later than 0.96.0 you have to restart twice in order for this component to work.

This is a known problem for some custom_components and will hopefully be fixed soon

### HACS

The easiest way to add this to your Homeassistant installation is using [HACS](https://custom-components.github.io/hacs/) and add this repository as a custom repository.
Expand Down
4 changes: 1 addition & 3 deletions custom_components/here_travel_time/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import re

import herepy
import voluptuous as vol

from homeassistant.components.sensor import PLATFORM_SCHEMA
Expand Down Expand Up @@ -272,7 +273,6 @@ 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,7 +290,6 @@ 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 Expand Up @@ -384,7 +383,6 @@ def _get_route_from_public_transport_line(public_transport_line_segment):
"""Extract Waze-like route info from the public transport lines."""
lines = []
for line_info in public_transport_line_segment:
print(line_info)
lines.append(
line_info['lineName'] + " - " + line_info['destination'])

Expand Down
12 changes: 12 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{% if prerelease %}
# This is a Beta version!
{% endif %}

# Important information for hass.io users on > 0.96.0

If you are using hass.io in a version later than 0.96.0 you have to restart twice in order for this component to work.

This is a known problem for some custom_components and will hopefully be fixed soon

---

[![GitHub Release][releases-shield]][releases]
[![GitHub Activity][commits-shield]][commits]
[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs)
Expand Down

0 comments on commit fb8be07

Please sign in to comment.