Skip to content

Commit

Permalink
Merge pull request #538 from WillCodeForCats/code-quality
Browse files Browse the repository at this point in the history
Remove duplicate keep_modbus_open.setter
  • Loading branch information
WillCodeForCats authored Feb 15, 2024
2 parents 981aa9d + b93ade5 commit 63849b7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions custom_components/solaredge_modbus_multi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,8 @@ def keep_modbus_open(self, value: bool) -> None:
else:
self._keep_modbus_open = False

_LOGGER.debug(f"keep_modbus_open={self._keep_modbus_open}")

@property
def allow_battery_energy_reset(self) -> bool:
return self._allow_battery_energy_reset
Expand All @@ -646,15 +648,6 @@ def number_of_batteries(self) -> int:
def number_of_inverters(self) -> int:
return self._number_of_inverters

@keep_modbus_open.setter
def keep_modbus_open(self, value: bool) -> None:
if value is True:
self._keep_modbus_open = True
else:
self._keep_modbus_open = False

_LOGGER.debug(f"keep_modbus_open={self._keep_modbus_open}")

@property
def sleep_after_write(self) -> int:
return self._sleep_after_write
Expand Down

0 comments on commit 63849b7

Please sign in to comment.