Skip to content

Commit

Permalink
Add getLinkPeers XmlRPC method (#1684)
Browse files Browse the repository at this point in the history
* Add comments

* Update __init__.py

* Update __init__.py

* Update changelog.md

* Update pyproject.toml
  • Loading branch information
SukramJ authored Aug 31, 2024
1 parent e34b88a commit 3173585
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 2024.9.0 (2024-09-01)

- Add getLinkPeers XmlRPC method

# Version 2024.8.15 (2024-08-29)

- Add check for link paramsets
Expand Down
10 changes: 8 additions & 2 deletions hahomematic/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ async def get_install_mode(self) -> int:
_LOGGER.warning("GET_INSTALL_MODE failed: %s [%s]", ex.name, reduce_args(args=ex.args))
return 0

async def get_link_peers(self, address: str) -> tuple[str, ...] | None:
"""Return a list of link pers."""
return tuple(await self._proxy.getLinkPeers(address))

async def get_value(
self,
channel_address: str,
Expand Down Expand Up @@ -563,8 +567,9 @@ async def put_paramset(
"""
Set paramsets manually.
Address is usually the channel_address,
but for bidcos devices there is a master paramset at the device.
Address is usually the channel_address, but for bidcos devices there is a master paramset at the device.
Paramset_key can be a str with a channel address in case of manipulating a direct link.
If paramset_key is string and contains a channel address, then the LINK paramset must be used for a check.
"""
is_link_call: bool = False
try:
Expand Down Expand Up @@ -596,6 +601,7 @@ async def put_paramset(
else:
await self._proxy.putParamset(channel_address, paramset_key, checked_values)

# if a call is related to a link then no further action is needed
if is_link_call:
return set()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "hahomematic"
version = "2024.8.15"
version = "2024.9.0"
license = {text = "MIT License"}
description = "Homematic interface for Home Assistant running on Python 3."
readme = "README.md"
Expand Down

0 comments on commit 3173585

Please sign in to comment.