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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
args:
- --safe
- --quiet
files: ^((plugwise|tests)/.+)?[^/]+\.py$
files: ^((plugwise|tests|scripts)/.+)?[^/]+\.py$
# Moved codespell configuration to setup.cfg as per 'all-files' issues not reading args
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## v0.31.3: Typing updates, improved fixture generation and manual mode-changes

## v0.31.2: Introduce strict-typing (py.typed)

## v0.31.1: Legacy Anna - read and process system-xml data
Expand Down
5 changes: 3 additions & 2 deletions plugwise/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
)
ACTIVE_ACTUATORS: Final[tuple[str, ...]] = (
"domestic_hot_water_setpoint",
"max_dhw_temperature",
"maximum_boiler_temperature",
"thermostat",
)
Expand Down Expand Up @@ -299,7 +300,6 @@
"humidity",
"illuminance",
"intended_boiler_temperature",
"maximum_boiler_temperature",
"modulation_level",
"net_electricity_cumulative",
"net_electricity_point",
Expand Down Expand Up @@ -383,6 +383,7 @@ class SmileSensors(TypedDict, total=False):
cooling_activation_outdoor_temperature: float
cooling_deactivation_threshold: float
dhw_temperature: float
domestic_hot_water_setpoint: float
temperature: float
electricity_consumed: float
electricity_consumed_interval: float
Expand Down Expand Up @@ -500,7 +501,7 @@ class DeviceData(
available: bool | None

binary_sensors: SmileBinarySensors
domestic_hot_water_setpoint: ActuatorData | float
max_dhw_temperature: ActuatorData | float
maximum_boiler_temperature: ActuatorData | float
sensors: SmileSensors
switches: SmileSwitches
Expand Down
6 changes: 6 additions & 0 deletions plugwise/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ def _get_actuator_functionalities(xml: etree, data: DeviceData) -> None:
temp_dict[key] = format_measure(function.text, TEMP_CELSIUS) # type: ignore [literal-required]

if temp_dict:
if item == "domestic_hot_water_setpoint":
item = "max_dhw_temperature"
# If max_dhw_temperature is present, don't show domestic_hot_water_setpoint sensor
if "domestic_hot_water_setpoint" in data:
data.pop("domestic_hot_water_setpoint")

data[item] = temp_dict # type: ignore [literal-required]


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"
version = "0.31.2"
version = "0.31.3"
license = {file = "LICENSE"}
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
readme = "README.md"
Expand Down
Loading