From 73b3623887a895a60394431b281986b8ddb11498 Mon Sep 17 00:00:00 2001 From: yellowcooln Date: Fri, 10 Jul 2026 11:22:16 -0400 Subject: [PATCH] chore: release v1.1.5 --- CHANGELOG.md | 4 +++- custom_components/pymc_repeater/__init__.py | 8 +++++--- custom_components/pymc_repeater/config_flow.py | 6 +++--- custom_components/pymc_repeater/manifest.json | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d923f3f..0fbaefd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # Changelog -## Unreleased +## 1.1.5 +- fixed the Home Assistant options flow crash on newer Home Assistant versions by avoiding assignment to the read-only `OptionsFlow.config_entry` property +- aligned the CAD settings service validation with newer repeater API bounds for CAD thresholds - added support for newer Repeater dev API data: packet type stats, LBT diagnostics, default region configuration, and dynamic update channels - added Home Assistant sensors/binary sensors/selects for default region and LBT/packet-type diagnostics diff --git a/custom_components/pymc_repeater/__init__.py b/custom_components/pymc_repeater/__init__.py index d35aa3d..c4c8903 100644 --- a/custom_components/pymc_repeater/__init__.py +++ b/custom_components/pymc_repeater/__init__.py @@ -281,9 +281,11 @@ async def _with_api_response( schema=vol.Schema( { vol.Optional(CONF_ENTRY_ID): str, - vol.Required("peak"): vol.Coerce(int), - vol.Required("min_val"): vol.Coerce(int), - vol.Optional("detection_rate", default=0): vol.Coerce(int), + vol.Required("peak"): vol.All(vol.Coerce(int), vol.Range(min=0, max=255)), + vol.Required("min_val"): vol.All(vol.Coerce(int), vol.Range(min=0, max=255)), + vol.Optional("detection_rate", default=0): vol.All( + vol.Coerce(int), vol.Range(min=0, max=255) + ), } ), ) diff --git a/custom_components/pymc_repeater/config_flow.py b/custom_components/pymc_repeater/config_flow.py index a59fa4d..e00dde7 100644 --- a/custom_components/pymc_repeater/config_flow.py +++ b/custom_components/pymc_repeater/config_flow.py @@ -191,7 +191,7 @@ class PyMCRepeaterOptionsFlow(config_entries.OptionsFlow): """Handle openHop Repeater options.""" def __init__(self, config_entry: config_entries.ConfigEntry) -> None: - self.config_entry = config_entry + self._config_entry = config_entry async def async_step_init( self, user_input: dict[str, Any] | None = None @@ -200,8 +200,8 @@ async def async_step_init( if user_input is not None: return self.async_create_entry(title="", data=user_input) - current_unit = self.config_entry.options.get(CONF_UPTIME_UNIT, DEFAULT_UPTIME_UNIT) - current_data_size_unit = self.config_entry.options.get( + current_unit = self._config_entry.options.get(CONF_UPTIME_UNIT, DEFAULT_UPTIME_UNIT) + current_data_size_unit = self._config_entry.options.get( CONF_DATA_SIZE_UNIT, DEFAULT_DATA_SIZE_UNIT ) schema = vol.Schema( diff --git a/custom_components/pymc_repeater/manifest.json b/custom_components/pymc_repeater/manifest.json index b1abb56..226f6bd 100644 --- a/custom_components/pymc_repeater/manifest.json +++ b/custom_components/pymc_repeater/manifest.json @@ -10,5 +10,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/openhop-dev/openHop-HA-Integration/issues", "requirements": [], - "version": "1.1.4" + "version": "1.1.5" }