How to disable ZHA (Zigbee Home Automation)?

EDIT: Sorry in advance for this long post, but it’s worth reading as it could save you from a lot of headaches / weird unexpected stuff happening later…

Glad you’re having some success.
Personally I’d still uninstall ZHA, because you don’t need it. You either use ZHA or Zigbee2MQTT, unless you have 2 separate zigbee coordinators giving you 2 separate zigbee networks.

Based on the situation I had (which yours seems very similar) every time I booted home assistant, ZHA and Z2M would have a race to see who got to the coordinator first and then start doing “zigbee stuff”, build their list of devices and and tell the rest of home assistant about it.
So now you have 2 separate conflicting lists of “zigbee stuff” that home assistant has been fed depending on who won the race at start up to get to the coordinator first.
A lot will be the same entities from both, but I’m guessing there will be some weird things floating around in home assistant that shouldn’t be there. These will cause weird issues later.

All you have done by disabling the auto discovery is stop ZHA from getting to the coordinator and making more of a mess, but there will still be some left over entitys /attributes of entities that ZHA made, home assistant knows about and Z2M can’t control.

Uninstalling ZHA will remove all that stuff, but will leave the stuff that Z2M knows about. (99% should be fine, that why I say do a backup first)

ACTUAL EXAMPLE:
One of my zigbee sensors discovered by both ZHA and Z2M had an extra attribute when ZHA discovered it.
For some reason ZHA added an entity to home assistant for the little blue status LED on it. Z2M couldn’t see/control that entity.
Google assistant automatically discovered that entity in home assistant and decided it must be a “light”
So when I was going to bed at night and I say “hey google, turn off all the lights” google assistant starts replying “turning off 37 things . Sorry one of your devices is not available. You might try setting it up again in the Google home app”
… That’s really relaxing to hear when you’re trying to wind down and go to sleep :rofl:

If you think of your zigbee network as an aeroplane, ZHA and Z2M are pilots, and homeassistant is the control tower. By preventing ZHA from seeing the coordinator but not uninstalling it, you now have an aeroplane with two pilots in the same cockpit, both talking to the control tower at the same time saying slightly different things, only the ZHA pilot isn’t allowed to touch any of the controls.

Not the optimal situation, the control tower is getting a headache and starting to get pissed off, probably going to cause an accident sooner or later :rofl::stuck_out_tongue_winking_eye:

3 Likes

Wow thanks for the elaborate reply (sorry for the late reply i missed your message)

I understand your explanation and would LOVE to uninstall ZHA. But i think i dont understand your first reply.

The integration first column, third row is the one that i would like to use. I am running HA in a docker and have a separate zwavejsui cintainer running. The integration you are pointing at is the integration that (successfully) controls all my current devices. Sometimes there popped up a new integration (dont know the name and cannot reproduce it because i am scared now ;)) which asked for the usb port with the zwave stick. Was under the impression that was ZHA which i surpressed by disabling USB

Again: i would love to disable/delete ZHA, but HOW?

If you have it installed then just click “Disable” and/or “Delete” on the “Zigbee Home Automation” integration. Those option is available in the overflow-menu (“…”) for each integration in “Settings” under “Devices & Services”. But in the picture from your original post it does not look like “Zigbee Home Automation” (ZHA) installation is installed.

Just click “Ignore” on it is the “Zigbee Home Automation” is discovered. The “Ignore” option is available in the overflow-menu (“…”) for each integration in “Settings” under “Devices & Services”.

If you have it installed then just click “Disable” and/or “Delete” on the “Zigbee Home Automation” integration.

Those options, as well as the “Ignore” option is available in the overflow-menu (“…”) for each integration in “Settings” under “Devices & Services”. But in the picture from your original post it does not look like “Zigbee Home Automation” (ZHA) integration is installed, and obviously, you can not “Disable” or “Delete” an integration that is not installed.

I am still confused, because I think I have never enabled or installed ZHA at all. I think the point is that HA is auto discovering my zigbee stick (in the USB of my RPI) and starts doing something with it to prepare for a ZHA installation (which I never confirmed).

I just checked and these are the installed integrations, where you see my working ‘Zigbee’ integration which is basically a MQTT listener:

For the sake of I searched for ZHA, I find this one which is also the one that pops-up every now and then when I have auto discovery on:


And you also see that it recognizes my stick:
Schermafbeelding 2023-04-04 153056

I just tested, but not it doesn’t interfere with my Zwavejsui, because it is already running. But after reboot, as @ArtyMarty described it is probably the race between HA auto discovery (for ZHA) and Zigbee2mqtt who comes first

Again, it does not look like you have the “Zigbee Home Automation” installed. It will not install by itself. So if it shows up as “New devices discovered” (which it can sometimes be via USB Discovery or Zeroconf) then simply just click “Ignore” on it is the “Zigbee Home Automation” is discovered. The “Ignore” option is available in the overflow-menu (“…”) for each integration in “Settings” under “Devices & Services”. Then forget about it.

Okay, i will have to try that. But if i remember correctly, by ignoring the autodiscovery of ZHA the issue still exists

If you want to find Zigbee2MQTT, that’s under
settings → add-ons
Like so:

ZHA on the other hand is where you are looking
Settings → devices and services

If you want to use Zigbee2MQTT, you can uninstall ZHA

I know it’s confusing because one is in add-ons, and the other is in devices & services. That’s what tricked me too.

Zigbee2MQTT will let you add a menu item like this

Which when opened looks like this:

That’s where you control the devices, and the entities just show up and are controlled like any other entities…

Unfortuately this is not available for me because I’m using a docker installation and a separate Zigbee2MQTT docker. I have this setup because I am migrating from Domoticz to HA and already had quite some set-up

This means I am not using the add-on, but I am just listening to the MQTT messages with the MQTT integration (which I named Zigbee in my screenshot above).

Ahhh, so that’s actually mosquitto or something?

Yes that is the broker indeed!

Thanks! After a day of work … Thanks again!

Hi all,
HA newbie here.

I read your messages and it seems your missing the point.
It seems that it is impossible to unisntall ZHA with the GUI (I have the latest version to date).

I saw a this code that should go in configuration.yaml (For all beginners, install Studio Code Server to find the file) :

default_config:
  exclude:
    - usb

BUT, this would applicable to all Home Assistant, not only ZHA, right ?

Anyway, if someone can make a screenshot of the uninstall button for ZHA, it would be great.

2 Likes

thank you very much jermm.

That’s what I did. For me, it “only” removes the integration entries, not ZHA. But if it what removing ZHA means, then that’s great.

Again, thank you very much.

For me I had trouble starting it, exactly the same problem as the original post.

I’m using a “ITead Sonoff Zigbee 3.0 USB Dongle Plus V2 model “ZBDongle-E””.

That suggested adding:

adapter: ezsp

under the serial: area in Configuration.

For me, that fixed it, and it now starts.

1 Like

Hello!

So do we have a definite solution for this issue, as I updated my haos and ha to latest versions and it broke my z2m, and it is driving me crazy again… :frowning:

This was the solution for me, thanks Jerrm! Would be nice if OP could mark your post as the solution so it stands at the top!

f1fcfd7179d09177ba3faec539833210ab688cca_2_174x375


I tested SHA but now I use Z2M. In Integrations, ZHA still appears, what can I do to stop it from appearing. I gave Ignore but after a period of time it appears again.

I click Delete on that menu but nothing happens. The integration wont delete.
What can i try?