diff --git a/plugin.py b/plugin.py index 26a15f6..1d75212 100644 --- a/plugin.py +++ b/plugin.py @@ -9,7 +9,7 @@ # """ - + @@ -334,7 +334,7 @@ class BasePlugin: lookup_table = unit[Column.LOOKUP] to_lookup = int(inverter_values[unit[Column.MODBUSNAME]]) - if to_lookup < len(lookup_table): + if to_lookup >= 0 and to_lookup < len(lookup_table): value = lookup_table[to_lookup] else: value = "Key not found in lookup table: {}".format(to_lookup)