Skip to content

Commit 3717d24

Browse files
committed
fix: cleanup
1 parent 30892de commit 3717d24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • custom_components/powercalc/strategy

custom_components/powercalc/strategy/fixed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def calculate(self, entity_state: State) -> Decimal | None:
5353
# Lookup by state attribute (attribute|value)
5454
for state_key, power in self._per_state_power.items():
5555
if "|" in state_key:
56-
attribute, value = state_key.split("|", 2)
56+
attribute, value = state_key.split("|", 1)
5757
if str(entity_state.attributes.get(attribute)) == value:
5858
return evaluate_to_decimal(power)
5959

0 commit comments

Comments
 (0)