Wall Switches - Wi-Fi to Zigbee Migration

I have too many wi-fi lights and bulbs: I’m going to start adding zigbee switches and swapping out the wi-fi ones as I go.

My zigbee controller is a Sonoff USB Dongle Plus. Could someone with more zigbee experience than me educate me: Should the dongle need replacing in the future; will re-pairing the devices with a new dongle change the entity_id of the paired devices in HA (in other words, do I have to rewrite all scripts/automations if I switch controllers)? I know I’ll have to do that for the switches that are currently on wi-fi that are migrating to zigbee.

Is there any way to define a global definition for an entity?

Such as “global.bedroom_light” => light.bedroom_light (current entity_id); so that the global can be referenced in scripts/automations and it’s value changed as needed.

I think I could create a template entity for all lights and reference the template in scripts/automations, then adjust the template to the new entity_id. Didn’t know if there was a simpler way to do this.

I know with Ziggbe2mqtt you can just rename the entity, so you could even re-use your wifi entities name in your automations :thinking:

Just stay away from using device_id’s.

2 Likes

Well, that didn’t even occur to me. Thank you, aceindy! I’m going to try that out!

Correct use Entity ID in your automation wherever possible and then you can swap any device for any other device as looas the entity is of the same domain type. Just rename entity b as entity a and no change to your automation.

Yes your Zigbee is backed up btw look up zigbee stick backups in the forum.

Also don’t replace random bulbs. The biggest thing people run into building zigbee is a weak mesh. Build your new mesh outward from the controller. Pair in place. And if your new thing won’t pair. You need more routing devices. Get more. This has always worked for me as long as ive followed other best practices like using a usb extension for my coordinator stick and otherwise ensuring that I’ve tried to avoid obvious interference from wifi and other 2-3ghz sources.

Good luck!

1 Like

Thanks Nathan; the “weak mesh” is a bit of a frustration. I have 17 devices on the controller now (door sensors, temp sensors, motion sensors, and 2 range extenders). It’s hit-or-miss on how far I can position the next device for sure. Those are all battery (except the range extenders), so I’m hoping the hard wired switches will add more juice to the network. Thanks for the suggestion!

1 Like

Careful! Most hard wired switches are not routers.

But by the sound of it, you do need a lot more.

1 Like

Sonoff ZBMini is a router
These are router too (1-gang to 4 gang)

afbeelding

As long as you stay away from ‘no-neutral’ switches you should be good. ‘no-neutral’ almost never is a router, because they don’t have permanent power.

1 Like

Thanks for link to the discussion!

I ordered some Milfra switches Ali; they do require a neutral; guess I’ll know when they get here :slight_smile: