Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## v0.44.4
## v0.44.5 - 2025-06-22

- PR [274](https://github.com/plugwise/python-plugwise-usb/pull/274): Make the energy-reset function available to Plus devices

## v0.44.4 - 2025-06-21

- PR [#255](https://github.com/plugwise/python-plugwise-usb/pull/255): Improve enery-logs reset process, enable use of a button in Plugwise_usb beta
- PR [#261](https://github.com/plugwise/python-plugwise-usb/pull/261): Sense: bugfix parsing of humidity value as an unsigned int
Expand Down
36 changes: 14 additions & 22 deletions plugwise_usb/nodes/circle_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@

_LOGGER = logging.getLogger(__name__)

FEATURES_CIRCLE_PLUS = (
NodeFeature.RELAY,
NodeFeature.RELAY_INIT,
NodeFeature.RELAY_LOCK,
NodeFeature.ENERGY,
NodeFeature.POWER,
NodeFeature.CIRCLE,
NodeFeature.CIRCLEPLUS,
)

class PlugwiseCirclePlus(PlugwiseCircle):
"""Plugwise Circle+ node."""
Expand All @@ -31,20 +40,11 @@
_LOGGER.debug("Loading Circle node %s from cache", self._node_info.mac)
if await self._load_from_cache():
self._loaded = True
self._setup_protocol(
CIRCLE_PLUS_FIRMWARE_SUPPORT,
(
NodeFeature.RELAY,
NodeFeature.RELAY_INIT,
NodeFeature.RELAY_LOCK,
NodeFeature.ENERGY,
NodeFeature.POWER,
NodeFeature.CIRCLEPLUS,
),
)
self._setup_protocol(CIRCLE_PLUS_FIRMWARE_SUPPORT, FEATURES_CIRCLE_PLUS)

Check warning on line 43 in plugwise_usb/nodes/circle_plus.py

View check run for this annotation

Codecov / codecov/patch

plugwise_usb/nodes/circle_plus.py#L43

Added line #L43 was not covered by tests
if await self.initialize():
await self._loaded_callback(NodeEvent.LOADED, self.mac)
return True

_LOGGER.info(
"Loading Circle+ node %s from cache failed",
self._node_info.mac,
Expand All @@ -67,20 +67,12 @@
self._node_info.mac,
)
return False

self._loaded = True
self._setup_protocol(
CIRCLE_PLUS_FIRMWARE_SUPPORT,
(
NodeFeature.RELAY,
NodeFeature.RELAY_INIT,
NodeFeature.RELAY_LOCK,
NodeFeature.ENERGY,
NodeFeature.POWER,
NodeFeature.CIRCLEPLUS,
),
)
self._setup_protocol(CIRCLE_PLUS_FIRMWARE_SUPPORT, FEATURES_CIRCLE_PLUS)
if not await self.initialize():
return False

await self._loaded_callback(NodeEvent.LOADED, self.mac)
return True

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 = "plugwise_usb"
version = "0.44.4"
version = "0.44.5"
license = "MIT"
keywords = ["home", "automation", "plugwise", "module", "usb"]
classifiers = [
Expand Down
1 change: 1 addition & 0 deletions tests/test_usb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2484,6 +2484,7 @@ async def test_node_discovery_and_load( # noqa: PLR0915
assert sorted(state[pw_api.NodeFeature.INFO].features) == sorted(
(
pw_api.NodeFeature.AVAILABLE,
pw_api.NodeFeature.CIRCLE,
pw_api.NodeFeature.CIRCLEPLUS,
pw_api.NodeFeature.INFO,
pw_api.NodeFeature.PING,
Expand Down
Loading