From f268dae08faa68e6f688e16ebfe481d2af330f96 Mon Sep 17 00:00:00 2001 From: Addie Janssen <55428983+addiejanssen@users.noreply.github.com> Date: Fri, 9 Oct 2020 16:58:46 +0200 Subject: [PATCH] Uploaded wrong version... --- plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.py b/plugin.py index eed5551..26a15f6 100644 --- a/plugin.py +++ b/plugin.py @@ -9,7 +9,7 @@ # """ - + @@ -332,9 +332,9 @@ class BasePlugin: Domoticz.Debug("-> looking up...") lookup_table = unit[Column.LOOKUP] - to_lookup = inverter_values[unit[Column.MODBUSNAME]] + to_lookup = int(inverter_values[unit[Column.MODBUSNAME]]) - if to_lookup in lookup_table: + if to_lookup < len(lookup_table): value = lookup_table[to_lookup] else: value = "Key not found in lookup table: {}".format(to_lookup)