ZHA UI options to perform Zigbee energy scan and change Zigbee network channel?

Request developers of Home Assistant ZHA integration add some UI options to ZHA (Zigbee Home Automation) integration for performing Zigbee energy scan and cthe hanging Zigbee network channel.



Both actions can today be achieved via zigpy-cli in combination with zha-toolkit custom component


The reason why you want to do so is to first check which Zigbee network channel is the least busy/noisy and then change/switch Zigbee network channel if not already on the most optimal channel for you:


To keep the options in GUI simple perhaps only give offer a choice of Zigbee network channels 15, 20, and 25 in the UI (which practically all Zigbee devices support) in order to avoid interoperability issues?


Regardless if give the option to choose any channel or only select between a few in the UI this feature would need a warning and explanation of what the feature does. Suggestion with example of warnings:


Do not change Zigbee network channel unless you have already performed a Zigbee energy scan and looked at what Wi-Fi channel your WiFi router/access-points are using, (note that the numbering of Zigbee network channels and Wi-Fi channels do not match so you need to look up the frequency uses in order to tell what channels overlap).

After you change the Zigbee network channel it can take a while, up to a few hours or more, before devices will reconnect. If you want to speed up the reconnecting process you can power-cycle your devices, however, the best is to wait to do so with battery-operated devices until your mains-powered devices have connected. If some devices do not reconnect then you will need to manually re-join/re-pair them, but you should never have to remove the device from the ZHA integration.

By the way, I believe this pull request should add the needed backend code for Home Assistant core: