diff --git a/custom_components/solarman/common.py b/custom_components/solarman/common.py index 2f4fba8..6825674 100644 --- a/custom_components/solarman/common.py +++ b/custom_components/solarman/common.py @@ -214,6 +214,9 @@ def lookup_value(value, dictionary): for o in dictionary: key = from_bit_index(o["bit"]) if "bit" in o else o["key"] + if o.get("mode") == "single" and value & key == key: + key = value + if "default" in o or key == "default": default = o["value"]