Skip to content

Commit bdc9a05

Browse files
committed
- Fix linter errors
- Bump version to 1.0.22
1 parent d872996 commit bdc9a05

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

custom_components/systemair/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def write_registers_32bit(self, address_1based: int, value: int) -> None:
9898
"""Write a 32-bit value across two registers."""
9999

100100
@abstractmethod
101-
async def get_all_data(self, enable_alarm_history: bool = False) -> dict[str, Any]:
101+
async def get_all_data(self, *, enable_alarm_history: bool = False) -> dict[str, Any]:
102102
"""Get all data from device."""
103103

104104

@@ -272,7 +272,7 @@ async def write_registers_32bit(self, address_1based: int, value: int) -> None:
272272
values = [low_word, high_word]
273273
await self._queue_request("write_multiple", address=address_1based - 1, values=values)
274274

275-
async def get_all_data(self, enable_alarm_history: bool = False) -> dict[str, Any]:
275+
async def get_all_data(self, *, enable_alarm_history: bool = False) -> dict[str, Any]:
276276
"""Queue read requests for all required data blocks and assemble the result."""
277277
read_blocks = list(READ_BLOCKS_BASE)
278278
if enable_alarm_history:
@@ -507,7 +507,7 @@ async def test_connection(self) -> bool:
507507
LOGGER.error("Serial port error during connection test: %s", e)
508508
return False
509509

510-
async def get_all_data(self, enable_alarm_history: bool = False) -> dict[str, Any]:
510+
async def get_all_data(self, *, enable_alarm_history: bool = False) -> dict[str, Any]:
511511
"""Queue read requests for all required data blocks and assemble the result."""
512512
read_blocks = list(READ_BLOCKS_BASE)
513513
if enable_alarm_history:
@@ -621,7 +621,7 @@ async def write_registers_32bit(self, address_1based: int, value: int) -> None:
621621
url = f"http://{self._address}/mwrite?{{{query_params}}}"
622622
await self._api_wrapper(method="get", url=url)
623623

624-
async def get_all_data(self, enable_alarm_history: bool = False) -> dict[str, Any]:
624+
async def get_all_data(self, *, enable_alarm_history: bool = False) -> dict[str, Any]:
625625
"""Get all data from device (compatibility with Modbus TCP client)."""
626626
async with self._lock:
627627
read_blocks = list(READ_BLOCKS_BASE)

custom_components/systemair/config_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@
2424
CONF_API_TYPE,
2525
CONF_BAUDRATE,
2626
CONF_BYTESIZE,
27+
CONF_ENABLE_ALARM_HISTORY,
2728
CONF_MODEL,
2829
CONF_PARITY,
2930
CONF_SERIAL_PORT,
3031
CONF_SLAVE_ID,
3132
CONF_STOPBITS,
3233
CONF_UPDATE_INTERVAL,
3334
CONF_WEB_API_MAX_REGISTERS,
34-
CONF_ENABLE_ALARM_HISTORY,
3535
DEFAULT_BAUDRATE,
3636
DEFAULT_BYTESIZE,
37+
DEFAULT_ENABLE_ALARM_HISTORY,
3738
DEFAULT_PARITY,
3839
DEFAULT_PORT,
3940
DEFAULT_SERIAL_PORT,
4041
DEFAULT_SLAVE_ID,
4142
DEFAULT_STOPBITS,
4243
DEFAULT_UPDATE_INTERVAL,
4344
DEFAULT_WEB_API_MAX_REGISTERS,
44-
DEFAULT_ENABLE_ALARM_HISTORY,
4545
DOMAIN,
4646
LOGGER,
4747
MODEL_SPECS,

custom_components/systemair/coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
SystemairClientBase,
1515
SystemairWebApiClient,
1616
)
17-
from .const import DOMAIN, LOGGER, CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY
17+
from .const import CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY, DOMAIN, LOGGER
1818
from .modbus import IntegerType, parameter_map
1919

2020
if TYPE_CHECKING:

custom_components/systemair/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
"aiohttp",
1616
"async-timeout"
1717
],
18-
"version": "1.0.21"
18+
"version": "1.0.22"
1919
}

custom_components/systemair/sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
from homeassistant.util import dt as dt_util
2525

26-
from .const import MODEL_SPECS, CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY
26+
from .const import CONF_ENABLE_ALARM_HISTORY, DEFAULT_ENABLE_ALARM_HISTORY, MODEL_SPECS
2727
from .entity import SystemairEntity
2828
from .modbus import (
2929
ModbusParameter,

0 commit comments

Comments
 (0)