Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to black 23.1.0 #248

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion custom_components/solaredge_modbus_multi/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ async def async_setup_entry(
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:

hub = hass.data[DOMAIN][config_entry.entry_id]["hub"]
coordinator = hass.data[DOMAIN][config_entry.entry_id]["coordinator"]

Expand Down
2 changes: 0 additions & 2 deletions custom_components/solaredge_modbus_multi/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async def async_step_user(self, user_input=None):
errors = {}

if user_input is not None:

if self._host_in_configuration_exists(user_input[CONF_HOST]):
errors[CONF_HOST] = "already_configured"
elif not host_valid(user_input[CONF_HOST]):
Expand Down Expand Up @@ -121,7 +120,6 @@ async def async_step_init(self, user_input=None) -> FlowResult:

"""Manage the options."""
if user_input is not None:

if user_input[CONF_SCAN_INTERVAL] < 1:
errors[CONF_SCAN_INTERVAL] = "invalid_scan_interval"
elif user_input[CONF_SCAN_INTERVAL] > 86400:
Expand Down
1 change: 0 additions & 1 deletion custom_components/solaredge_modbus_multi/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def parse_modbus_string(s: str) -> str:


def update_accum(self, accum_value: int) -> None:

if self.last is None:
self.last = 0

Expand Down
1 change: 0 additions & 1 deletion custom_components/solaredge_modbus_multi/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ async def async_setup_entry(
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:

hub = hass.data[DOMAIN][config_entry.entry_id]["hub"]
coordinator = hass.data[DOMAIN][config_entry.entry_id]["coordinator"]

Expand Down
1 change: 0 additions & 1 deletion custom_components/solaredge_modbus_multi/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ async def async_setup_entry(
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:

hub = hass.data[DOMAIN][config_entry.entry_id]["hub"]
coordinator = hass.data[DOMAIN][config_entry.entry_id]["coordinator"]

Expand Down
2 changes: 0 additions & 2 deletions custom_components/solaredge_modbus_multi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ async def async_setup_entry(
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:

hub = hass.data[DOMAIN][config_entry.entry_id]["hub"]
coordinator = hass.data[DOMAIN][config_entry.entry_id]["coordinator"]

Expand Down Expand Up @@ -1834,7 +1833,6 @@ def native_value(self):
or self._platform.decoded_model["B_DC_Voltage"] < BatteryLimit.Vmin
or self._platform.decoded_model["B_DC_Voltage"] > BatteryLimit.Vmax
):

return None

elif self._platform.decoded_model["B_Status"] in [0]:
Expand Down
1 change: 0 additions & 1 deletion custom_components/solaredge_modbus_multi/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ async def async_setup_entry(
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:

hub = hass.data[DOMAIN][config_entry.entry_id]["hub"]
coordinator = hass.data[DOMAIN][config_entry.entry_id]["coordinator"]

Expand Down