diff --git a/mvg_live/__init__.py b/mvg_live/__init__.py index 6ac5c092c..c78560788 100755 --- a/mvg_live/__init__.py +++ b/mvg_live/__init__.py @@ -27,7 +27,7 @@ class MVG_Live(SmartPlugin): ALLOW_MULTIINSTANCE = False - PLUGIN_VERSION = "1.6.0" + PLUGIN_VERSION = "1.6.1" def __init__(self, sh, *args, **kwargs): """ @@ -42,14 +42,19 @@ def stop(self): self.alive = False def get_station(self, station): - mvg_station = MvgApi.station(station) - if mvg_station: - return mvg_station + try: + mvg_station = MvgApi.station(station) + if mvg_station: + return mvg_station + except MvgApiError as e: + self.logger.error("MVGLive: Could not find %s: %s" % (ort, e)) def get_station_departures(self, station): mvg_station = self.get_station(station) + self.logger.error(mvg_station) if mvg_station: mvgapi = MvgApi(mvg_station['id']) + mvgapi.station_id = mvg_station['id'] return mvgapi.departures() else: - logger.error("Station %s does not exist."%station) \ No newline at end of file + self.logger.error("Station %s does not exist."%station) \ No newline at end of file diff --git a/mvg_live/plugin.yaml b/mvg_live/plugin.yaml index 65b810d52..260a57f28 100755 --- a/mvg_live/plugin.yaml +++ b/mvg_live/plugin.yaml @@ -12,8 +12,8 @@ plugin: documentation: http://smarthomeng.de/user/plugins_doc/config/mvg_live.html support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1108867-neues-plugin-mvg_live - version: 1.6.0 # Plugin version - sh_minversion: '1.5' # minimum shNG version to use this plugin + version: 1.6.1 # Plugin version + sh_minversion: '1.5' # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) multi_instance: False # plugin supports multi instance restartable: unknown