How do you replace devices?

3 months ago by EarMaster to c/homeassistant

I recently had to replace an old Zigbee bulb that had stopped working properly. How do you handle this? Do you manually replace all instances of this device in all automations, scenes, etc.? Or is there a magic button I am not aware of that makes this easier? At least I could use Spook to let me know which places I need to look at, but especially for scenes it is a pain because you need to reconfigure the settings for the device manually.

roofuskit 42 points 3 months ago

Copy the entity ID from the old device. Delete it. Add new device and change the entity ID of the new one to the old.

It would be great if they built a device replacement function that would intelligently swap all the entities from an old device to a new one.

path: 0 24769438, hotness: undefined, score: 42, children: 8
ripcord 23 points 3 months ago

Missing basics like this are one of the things that drive me crazy about HA (as an 8-year user). Yes, the new Maintenance dashboard is nice, but they really need to focus more on creaky foundational problems.

path: 0 24769438 24772694, hotness: undefined, score: 23, children: 7
vaionko 5 points 3 months ago

Still waiting for a way to organize my automations...

path: 0 24769438 24772694 24779749, hotness: undefined, score: 5, children: 1
Joelk111 3 points 3 months ago

I'm curious what you'd like for organization, I have all of mine sorted into categories.

path: 0 24769438 24772694 24779749 24799258, hotness: undefined, score: 3, children: 0
roofuskit -5 points 3 months ago

Whatever you do don't tell them that. The "community project" with 5-6 full time paid developers will berate you for being ungrateful for your free software that thousands of users pay monthly to have developed.

path: 0 24769438 24772694 24777584, hotness: undefined, score: -5, children: 4
spitfire 5 points 3 months ago

I havenโ€™t seen that attitude with HA, but for some other projects yes. It also may depend on what your attitude is when asking questions.

path: 0 24769438 24772694 24777584 24779607, hotness: undefined, score: 5, children: 3
roofuskit 2 points 3 months ago

I 1000% get the fully volunteer projects being defensive. They catch a lot of shit for no pay.

But once I asked why they reworked and removed functionality that was easier to use and understand than what they replaced it with and they took me to task about how the person who did it was a volunteer contributor. OKAY, I get that there's still lots of volunteer code submissions but shouldn't the full time employees being overseeing it to make sure changes are improvements in all aspects?

I love the software and I have used it almost since the beginning, but if the community is paying for development and it's the actual livelyhood of the employees, I don't want to hear that I should be happy with what I get because it's "free."

path: 0 24769438 24772694 24777584 24779607 24781383, hotness: undefined, score: 2, children: 2
franzbroetchen 20 points 3 months ago

For me the magic is to use entities for everything, not raw devices. If I replace a device I just assign all of its entities the same IDs they had before and everything keeps working. I don't think this is highlighted as prominently as it should be, but I found this advice on Reddit back in the day and got rid of a lot of the issues with my setup

path: 0 24769230, hotness: undefined, score: 20, children: 1
CompactFlax 6 points 3 months ago

My perception is that the devices are more forward when configuring automations than the entities. Maybe Iโ€™m mistaken.

But that is how I do it all. Devices are too much trouble. I learned when I reassigned some outlets.

path: 0 24769230 24770012, hotness: undefined, score: 6, children: 0
nanianmichaels 19 points 3 months ago

@EarMaster Someone else here on Fedi taught me a trick for that!

You create device groups and add the devices you want to them. Doesn't matter if it's only for one lightbulb, you create a group for it.

Then you build your automations targeting the group, and not the device(s) inside of it.

To help with clutter, you can even hide the individual devices from the UI.

Now, when you need to replace that device, you add the replacement to the group, remove the failed/old one, and it's done! No need to scour automations and scripts, or to redo your cards or dashboards!

I'll update the post in a few hours with the link to the person who taught me this, can't do it right now.

Edit: As promised, linking to @unixorn, who was the one that taught me this: https://hachyderm.io/@unixorn/115294312403405669

path: 0 24769302, hotness: undefined, score: 19, children: 3
bob_lemon 2 points 3 months ago

That's what I did when I changed my phone recently. Works really well, and the next phone upgrade (hopefully not before 2032) will be super easy.

path: 0 24769302 24775360, hotness: undefined, score: 2, children: 0
KairuByte 2 points 3 months ago

This feels like an overly complicated solution to a problem that can be solved by simply making sure the new device has the same entity id as the oldโ€ฆ

Not trying to be rude, because your solution does work. It just adds so much overhead to setup.

path: 0 24769302 24781293, hotness: undefined, score: 2, children: 0
EarMaster 2 points 3 months ago

That seems like overkill for me tbh. That means in addition to my numerous devices I have an additional group for every one of them and it also clutters the device selector.

path: 0 24769302 24784137, hotness: undefined, score: 2, children: 0
Maestro 6 points 3 months ago

If you use zigbee2mqtt it's easy. Just set the old HA ID on the bulb in zigbee2mqtt.

path: 0 24776386, hotness: undefined, score: 6, children: 0
lemimmi 5 points 3 months ago

I changed my automations since the Labs Experiment and this months update to "turn any lamp in area living room on" with Purpose-specific triggers and conditions. Made it easier to switch out my window sensors lately.

path: 0 24774055, hotness: undefined, score: 5, children: 0
homeassistant
homeassistant

@lemmy.world

login for more options
20857
941
1192

Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.

Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation

Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk

go to feed...