From 635003180eca2bc5e68bc52316e1e9b3c535f7aa Mon Sep 17 00:00:00 2001 From: David Rapan Date: Wed, 14 Aug 2024 14:29:26 +0200 Subject: [PATCH] fix: Grouping predicate lambda selector --- custom_components/solarman/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solarman/parser.py b/custom_components/solarman/parser.py index 1cef36e..f712bea 100644 --- a/custom_components/solarman/parser.py +++ b/custom_components/solarman/parser.py @@ -107,7 +107,7 @@ def get_requests(self, runtime = 0): registers.sort() - groups = group_when(registers, self._lambda if all_same(list(self._registers_table.values())) else self._lambda_code_aware) + groups = group_when(registers, self._lambda if all_same([self._registers_table[r] for r in registers]) else self._lambda_code_aware) return [{ REQUEST_START: r[0], REQUEST_END: r[-1], REQUEST_CODE: self._registers_table[r[0]] } for r in groups]