Skip to content

Commit

Permalink
Merge pull request #466 from WillCodeForCats/code-quality
Browse files Browse the repository at this point in the history
Move RetrySettings class to top
  • Loading branch information
WillCodeForCats authored Nov 12, 2023
2 parents 6d06550 + 837dfa0 commit 3e358db
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions custom_components/solaredge_modbus_multi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ class StrEnum(str, Enum):
)


class RetrySettings(IntEnum):
"""Retry settings when opening a connection to the inverter fails."""

Time = 800 # first attempt in milliseconds
Ratio = 3 # time multiplier between each attempt
Limit = 4 # number of attempts before failing


class ModbusDefaults(IntEnum):
"""Values to pass to pymodbus"""

Expand All @@ -55,14 +63,6 @@ class SolarEdgeTimeouts(IntEnum):
Init = 1200


class RetrySettings(IntEnum):
"""Retry settings when opening a connection to the inverter fails."""

Time = 800 # first attempt in milliseconds
Ratio = 3 # time multiplier between each attempt
Limit = 4 # number of attempts before failing


class BatteryLimit(IntEnum):
"""Configure battery limits for input and display validation."""

Expand Down

0 comments on commit 3e358db

Please sign in to comment.