Updated HASS and zwave devices renamed themselves - broke all my automations

I recently decided to update my home assistant (I’m running a docker on a Qnap NAS) and the next day none of my zwave automations worked. So I looked into it and it appears that all of the devices re-named themselves to default names and the “devices” in my automations were are cleared.

Anybody know why this happened or how to prevent it from happening again? I now have to re-configure every single automation again which is a real bummer.

I can’t help with the change in all your devices, never heard of that before.

I can suggest changing all of your device triggers, conditions and action services to state based ones using an entity_id. At least then if any of your devices change again, or you choose to replace one all you need to do is change the entity_id for the light or switch or whatever back to what it was before and all your automations will work again straight away.

Not much help to you now I know, but this is a good example of why using devices rather than states in automations should be avoided.

I believe that’s how I’ve been doing it. Here’s an example. I have a z wave outlet that I use to start my coffee pot in the morning, then turn off once it’s done brewing so it’s drinking temperature by the time I get up.

Here is what I just pulled from my automation yaml file (The device ID had a lot more numbers but I shrunk it down to post up here and X’ed out the id)

- id: 'XXXX'
  alias: Coffee Pot
  description: Turn Coffee Pot on at 6.30am
  trigger:
  - at: 06:30:00
    platform: time
  condition: []
  action:
  - device_id: fabdab96f
    domain: switch
    entity_id: switch.coffee_pot_switch
    type: turn_on
  - delay: 00:15:00
  - device_id: fabdab96f
    domain: switch
    entity_id: switch.coffee_pot_switch
    type: turn_off


This screenshot shows how my automation is blank now (no device for the actions to go to)

and this shows that my three Zwave outlets have all been defaulted to their manufacturer name. I had these with friendly names (coffee pot, xmas lights and spare) as to whatever they controlled. Now I have to figure out which one was which, rename them and set everything back up. (Other Zwave devices also messed up. None of my in wall light switches are named the same either)

I don’t know why they lost their friendly names? I think what you were saying was that all of have to do is rename the device to what I had it (or a new device if I was replacing it) and all would be well. However as you can see from my automation file there is some odd device name there now (I’ll have to check my offline backup when I get home to see if this device name has always been fabdab39399383 but I don’t ever remember seeing that before.

No, I’m suggesting not using the devices and using state based, so your action would be…

action:
  - service: switch.turn_on
    entity_id: switch.coffee_pot_switch
  - delay: 00:15:00
  - service: switch.turn_off
    entity_id: switch.coffee_pot_switch

Using this method, all you would need to do when you have to completely redo your Zwave (for example due to a complete system fubar as you described in your op) is just make sure that the entity_ids match what they were before the crash.

But because you’re using the device based actions, you will now have to go through all your automations and change all the device_ids to what you now have after rebuilding your Zwave network.