From ccedce761ecbe82c6025c9ed7abada064dcc807c Mon Sep 17 00:00:00 2001 From: Marc Dirix Date: Thu, 11 Sep 2025 19:59:52 +0200 Subject: [PATCH 1/6] Add number to set the Sense report internal --- custom_components/plugwise_usb/number.py | 12 ++++++++++++ custom_components/plugwise_usb/strings.json | 3 +++ custom_components/plugwise_usb/translations/en.json | 3 +++ custom_components/plugwise_usb/translations/nl.json | 3 +++ 4 files changed, 21 insertions(+) diff --git a/custom_components/plugwise_usb/number.py b/custom_components/plugwise_usb/number.py index f5d249f8..ea1229ab 100644 --- a/custom_components/plugwise_usb/number.py +++ b/custom_components/plugwise_usb/number.py @@ -156,6 +156,18 @@ class PlugwiseNumberEntityDescription( async_number_type="float", mode="box", ), + PlugwiseNumberEntityDescription( + key="report_interval", + translation_key="sense_report_interval", + async_number_fn="set_report_interval", + node_feature=NodeFeature.SENSE_HYSTERESIS, + device_class=NumberDeviceClass.DURATION, + native_unit_of_measurement=UnitOfTime.MINUTES, + entity_category=EntityCategory.CONFIG, + native_max_value=60, + native_min_value=1, + mode="box", + ), ) diff --git a/custom_components/plugwise_usb/strings.json b/custom_components/plugwise_usb/strings.json index 4dc8f062..2bedc7f4 100644 --- a/custom_components/plugwise_usb/strings.json +++ b/custom_components/plugwise_usb/strings.json @@ -172,6 +172,9 @@ }, "sense_temperature_lower_bound": { "name": "Temperature lower boundary value" + }, + "sense_report_interval": { + "name": "Measurement report interval" } }, "button": { diff --git a/custom_components/plugwise_usb/translations/en.json b/custom_components/plugwise_usb/translations/en.json index d7dcc8f8..fce710aa 100644 --- a/custom_components/plugwise_usb/translations/en.json +++ b/custom_components/plugwise_usb/translations/en.json @@ -172,6 +172,9 @@ }, "sense_temperature_lower_bound": { "name": "Temperature lower boundary value" + }, + "sense_report_interval": { + "name": "Measurement report interval" } }, "button": { diff --git a/custom_components/plugwise_usb/translations/nl.json b/custom_components/plugwise_usb/translations/nl.json index b6638dcb..bfab07d5 100644 --- a/custom_components/plugwise_usb/translations/nl.json +++ b/custom_components/plugwise_usb/translations/nl.json @@ -172,6 +172,9 @@ }, "sense_temperature_lower_bound": { "name": "Lage schakelpunt temperatuur" + }, + "sense_report_interval": { + "name": "Meetraportage interval" } }, "button": { From d29c4bf69f72908384d9dd65ad7e634b2d4bb817 Mon Sep 17 00:00:00 2001 From: Marc Dirix Date: Thu, 11 Sep 2025 20:06:58 +0200 Subject: [PATCH 2/6] remove removed ignore as recommended --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c8b8a02d..4caed396 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -544,8 +544,6 @@ ignore = [ "TRY003", # Avoid specifying long messages outside the exception class "TRY400", # Use `logging.exception` instead of `logging.error` - # Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923 - "UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` # May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", From 1aeff3c9a6b2e960748518b55feee96cb0ff7a82 Mon Sep 17 00:00:00 2001 From: Marc Dirix Date: Thu, 11 Sep 2025 20:28:59 +0200 Subject: [PATCH 3/6] CR: Improve wording for natural English --- custom_components/plugwise_usb/strings.json | 2 +- custom_components/plugwise_usb/translations/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/plugwise_usb/strings.json b/custom_components/plugwise_usb/strings.json index 2bedc7f4..bb1ecefc 100644 --- a/custom_components/plugwise_usb/strings.json +++ b/custom_components/plugwise_usb/strings.json @@ -174,7 +174,7 @@ "name": "Temperature lower boundary value" }, "sense_report_interval": { - "name": "Measurement report interval" + "name": "Measurement reporting interval" } }, "button": { diff --git a/custom_components/plugwise_usb/translations/en.json b/custom_components/plugwise_usb/translations/en.json index fce710aa..c6517192 100644 --- a/custom_components/plugwise_usb/translations/en.json +++ b/custom_components/plugwise_usb/translations/en.json @@ -174,7 +174,7 @@ "name": "Temperature lower boundary value" }, "sense_report_interval": { - "name": "Measurement report interval" + "name": "Measurement reporting interval" } }, "button": { From d064a4b9c5db8d776210118bf6d99b408b4a9cd8 Mon Sep 17 00:00:00 2001 From: Marc Dirix Date: Thu, 11 Sep 2025 20:30:10 +0200 Subject: [PATCH 4/6] CR: Add native_step=1; implement/verify report_interval wiring --- custom_components/plugwise_usb/number.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/plugwise_usb/number.py b/custom_components/plugwise_usb/number.py index ea1229ab..8735b854 100644 --- a/custom_components/plugwise_usb/number.py +++ b/custom_components/plugwise_usb/number.py @@ -166,6 +166,7 @@ class PlugwiseNumberEntityDescription( entity_category=EntityCategory.CONFIG, native_max_value=60, native_min_value=1, + native_step=1, mode="box", ), ) From 71fb4cfd5330ab91c85f68c0490bfe0569ce0781 Mon Sep 17 00:00:00 2001 From: Marc Dirix Date: Thu, 11 Sep 2025 20:31:25 +0200 Subject: [PATCH 5/6] CR: Fix Dutch typo and compound noun --- custom_components/plugwise_usb/translations/nl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/plugwise_usb/translations/nl.json b/custom_components/plugwise_usb/translations/nl.json index bfab07d5..92436dcb 100644 --- a/custom_components/plugwise_usb/translations/nl.json +++ b/custom_components/plugwise_usb/translations/nl.json @@ -174,7 +174,7 @@ "name": "Lage schakelpunt temperatuur" }, "sense_report_interval": { - "name": "Meetraportage interval" + "name": "Meetrapportage-interval" } }, "button": { From 478184a4d12bdafa81aa4280e2b380e414c50f65 Mon Sep 17 00:00:00 2001 From: Marc Dirix Date: Fri, 12 Sep 2025 10:42:01 +0200 Subject: [PATCH 6/6] bump version to 0.57.0 --- CHANGELOG.md | 5 +++++ custom_components/plugwise_usb/manifest.json | 4 ++-- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9939d04b..3fc81ea3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v0.57.0 - 2025-09-12 + +- Activate new Sense feature, report interval setting via PR [331](https://github.com/plugwise/plugwise_usb-beta/pull/331) +- Link to plugwise_usb [v0.46.0](https://github.com/plugwise/python-plugwise-usb/releases/tag/v0.46.0) + ## v0.56.0 - 2025-09-03 - Activate new Sense hysteresis based switch action via PR [326](https://github.com/plugwise/plugwise_usb-beta/pull/326) diff --git a/custom_components/plugwise_usb/manifest.json b/custom_components/plugwise_usb/manifest.json index a6c095bd..b6738a38 100644 --- a/custom_components/plugwise_usb/manifest.json +++ b/custom_components/plugwise_usb/manifest.json @@ -9,6 +9,6 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/plugwise/python-plugwise-usb/issues", "loggers": ["plugwise_usb"], - "requirements": ["plugwise-usb==0.45.0"], - "version": "0.56.0" + "requirements": ["plugwise-usb==0.46.0"], + "version": "0.57.0" } diff --git a/pyproject.toml b/pyproject.toml index 4caed396..20dbc58f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "plugwise_usb-beta" -version = "0.55.13" +version = "0.57.0" description = "Plugwise USB custom_component (BETA)" readme = "README.md" requires-python = ">=3.13"