Skip to content

Commit

Permalink
Fix case where negative diff could be passed to decrement power target.
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstreamData committed Nov 19, 2023
1 parent 084967e commit e09dbd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/miner/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async def async_set_native_value(self, value):

if smooth_tune:
if diff < 0:
result = await miner.web.grpc.decrement_power_target(diff)
result = await miner.web.grpc.decrement_power_target(-diff)
else:
result = await miner.web.grpc.increment_power_target(diff)
else:
Expand Down

0 comments on commit e09dbd0

Please sign in to comment.