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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 5 additions & 3 deletions custom_components/pymc_repeater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
}
),
)
Expand Down
6 changes: 3 additions & 3 deletions custom_components/pymc_repeater/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/pymc_repeater/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}