How to Change ZHA Network Key

Hello to everyone :smiley:
Did someone could help me to change the ZHA network KEY? because now everytime i will start HA i have this message:

Logger: zigpy_znp.zigbee.application
Source: /usr/local/lib/python3.8/site-packages/zigpy_znp/zigbee/application.py:372
First occurred: 1 luglio 2021, 17:26:40 (1 occurrences)
Last logged: 1 luglio 2021, 17:26:40

Your network is using the insecure Zigbee2MQTT network key!

And i want to change the key to secure my network.
Thanks a lot
Stefano

3 Likes

Add the following to your configuraiton

zha:
  zigpy_config:
    network:
      key: [...]

and if the issue still persists, you need to form a new zigbee network using GitHub - zigpy/zigpy-cli: Command line interface for zigpy

Why is the key option not documented here: Zigbee Home Automation - Home Assistant ?

Please do edit and submit a pull request for ZHA docs:

https://github.com/home-assistant/home-assistant.io/blob/674ef79531d3811677a50c85ebb6c3bff1ae7ca4/source/_integrations/zha.markdown

ZHA documentation is maintained by everyone in the community, which include you and me. You can edit the zha.markdown file via GitHub web interface as long as register + login to an GitHub accout.

https://github.com/home-assistant/home-assistant.io/edit/current/source/_integrations/zha.markdown

Note that you will need to re-pair all your devices if you change the Zigbee network key.

@regevbr Any chance you can give some example, how to provide the actual key?
I can’t find anything online :frowning: