New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add silabs_multiprotocol
platform
#92904
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
fff1d45
to
d7b921b
Compare
d7b921b
to
7fa3cb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've tested this using the SiLabs Multiprotocol add-on. Thread and ZHA successfully migrated the channel 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me as well.
Only thing I can suggest is some UI feedback for the five minute timer, since it won't be obvious what exactly happens once the flow completes.
diff --git a/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py b/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py
index a11efdb8a6..055e6cace3 100644
--- a/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py
+++ b/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py
@@ -524,6 +524,15 @@ class OptionsFlowHandler(config_entries.OptionsFlow, ABC):
# Change the shared channel
await multipan_manager.async_change_channel(int(user_input["channel"]))
+ return await self.async_step_notify_channel_change()
+
+ async def async_step_notify_channel_change(
+ self, user_input: dict[str, Any] | None = None
+ ) -> FlowResult:
+ """Notify that the channel change will take about five minutes."""
+ if user_input is None:
+ return self.async_show_form(step_id="notify_channel_change")
+
return self.async_create_entry(title="", data={})
async def async_step_uninstall_addon(
diff --git a/homeassistant/components/homeassistant_hardware/strings.json b/homeassistant/components/homeassistant_hardware/strings.json
index 6ec352651e..2964a66c9d 100644
--- a/homeassistant/components/homeassistant_hardware/strings.json
+++ b/homeassistant/components/homeassistant_hardware/strings.json
@@ -27,6 +27,10 @@
"channel": "Channel"
}
},
+ "notify_channel_change": {
+ "title": "Channel change scheduled",
+ "description": "A Zigbee and Thread channel change has been scheduled and will begin in five minutes."
+ },
"show_revert_guide": {
"title": "Multiprotocol support is enabled for this device",
"description": "If you want to change to Zigbee only firmware, please complete the following manual steps:\n\n * Remove the Silicon Labs Multiprotocol addon\n\n * Flash the Zigbee only firmware, follow the guide at https://github.com/NabuCasa/silabs-firmware/wiki/Flash-Silicon-Labs-radio-firmware-manually.\n\n * Reconfigure ZHA to migrate settings to the reflashed radio"
* Add silabs_multiprotocol platform * Add new files * Add ZHA tests * Prevent ZHA from creating database during tests * Add delay parameter to async_change_channel * Add the updated dataset to the dataset store * Allow MultipanProtocol.async_change_channel to return a task * Notify user about the duration of migration * Update tests
Proposed change
Add
silabs_multiprotocol
platformIntegrations which support using an IEEE 802.15.4 radio with multiprotocol support, currently ZHA and OTBR, can implement a
silabs_multiprotocol
platform which supports changing the channel.The motivation is that the Silicon labs radio used in the Home Assistant Yellow and Home Assistant Sky Connect requires both Thread/Matter on Zigbee to be on the same channel when in multiprotocol mode.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: