Skip to content

Commit bea3cb8

Browse files
authored
Merge pull request #258 from plugwise/sense
Sense calls Sed load function which enables battery configuration parameters
2 parents ad59efd + 21a3b10 commit bea3cb8

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v0.44.1
4+
5+
- PR [#258](https://github.com/plugwise/python-plugwise-usb/pull/258)
6+
- Sense: make sure NodeFeature.BATTERY is called and configuration parameters are propagated properly
7+
38
## v0.44.0
49

510
- PR [#256](https://github.com/plugwise/python-plugwise-usb/pull/256) Implement PlugWise Sense product

plugwise_usb/nodes/sense.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,17 @@ async def load(self) -> bool:
5151
if self._loaded:
5252
return True
5353

54-
self._node_info.is_battery_powered = True
55-
if self._cache_enabled:
56-
_LOGGER.debug("Loading Sense node %s from cache", self._node_info.mac)
57-
await self._load_from_cache()
58-
else:
59-
self._load_defaults()
60-
self._loaded = True
61-
self._setup_protocol(
62-
SENSE_FIRMWARE_SUPPORT,
63-
(NodeFeature.INFO, NodeFeature.SENSE),
64-
)
54+
_LOGGER.debug("Loading Sense node %s", self._node_info.mac)
55+
if not await super().load():
56+
_LOGGER.debug("Load Sense base node failed")
57+
return False
58+
59+
self._setup_protocol(SENSE_FIRMWARE_SUPPORT, SENSE_FEATURES)
6560
if await self.initialize():
6661
await self._loaded_callback(NodeEvent.LOADED, self.mac)
6762
return True
68-
_LOGGER.debug("Loading of Sense node %s failed", self._node_info.mac)
63+
64+
_LOGGER.debug("Load Sense node %s failed", self._node_info.mac)
6965
return False
7066

7167
@raise_not_loaded

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "plugwise_usb"
7-
version = "0.44.0"
7+
version = "0.44.1"
88
license = "MIT"
99
keywords = ["home", "automation", "plugwise", "module", "usb"]
1010
classifiers = [

0 commit comments

Comments
 (0)