Skip to content

Commit 4201e4b

Browse files
authored
Support config API key (#14)
1 parent 7f3caa1 commit 4201e4b

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

elro/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Elro connects P1 API."""
22

3-
__version__ = "0.5.1"
3+
__version__ = "0.5.2"

elro/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ async def async_disconnect(self) -> None:
156156
finally:
157157
self._lock.release()
158158

159-
async def async_configure(self, ipaddress: str, port: int = 1025) -> None:
159+
async def async_configure(
160+
self, ipaddress: str, port: int = 1025, api_key: str | None = None
161+
) -> None:
160162
"""Process updated settings."""
161163
try:
162164
await self._lock.acquire()
@@ -166,6 +168,7 @@ async def async_configure(self, ipaddress: str, port: int = 1025) -> None:
166168
self._transport = None
167169
self._protocol = None
168170
self._session = {}
171+
self._api_key = api_key
169172
self._remoteaddress = (ipaddress, port)
170173
self._lock.release()
171174

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[metadata]
22
name = lib-elro-connects
33
author = Jan Bouwhuis, Bas van den Berg, Johannes Kulick
4-
version = 0.5.1
4+
version = 0.5.2
55
description = Provides an API to the Elro Connects K1 Connector
66
long_description = file: README.md, LICENSE
77
license = MIT License

tests/test_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
MOCK_DEVICE_RESPONSE = [
2222
{
2323
"ctrlKey": "deadbeefdeadbeefdeadbeefdeadbeef",
24-
"devTid": "ST_84f3eb1a0021",
24+
"devTid": "ST_deadbeef0000",
2525
"devType": "INDEPENDENT",
2626
"mid": "0123456789ab",
2727
"bindKey": "beefdead012345678beefdead0123456",

0 commit comments

Comments
 (0)