Skip to content

Commit ca3c493

Browse files
committed
- More linter fixes
1 parent bdc9a05 commit ca3c493

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

custom_components/systemair/coordinator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ async def async_setup_webapi(self) -> None:
158158
async def _async_update_data(self) -> dict[str, Any]:
159159
"""Update data via library."""
160160
try:
161-
enable_alarm_history = self.config_entry.options.get(
162-
CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY
163-
)
161+
enable_alarm_history = self.config_entry.options.get(CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY)
164162
if self._is_webapi:
165163
if self.modbus_parameters:
166164
return await self.client.async_get_data(self.modbus_parameters)

custom_components/systemair/sensor.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,7 @@ def __init__(
426426
def available(self) -> bool:
427427
"""Return if entity is available."""
428428
if self.entity_description.key == "alarm_history":
429-
return self.coordinator.config_entry.options.get(
430-
CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY
431-
) and super().available
429+
return self.coordinator.config_entry.options.get(CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY) and super().available
432430
return super().available
433431

434432
@property
@@ -439,9 +437,7 @@ def native_value(self) -> str | None:
439437

440438
key = self.entity_description.key
441439
if key == "alarm_history":
442-
if not self.coordinator.config_entry.options.get(
443-
CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY
444-
):
440+
if not self.coordinator.config_entry.options.get(CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY):
445441
return None
446442

447443
first_log = alarm_log_registers[0]

0 commit comments

Comments
 (0)