Why are the states all device reloaded on exclusion of one device?

When excluding a device from the z-wave network, is it expected that the integration would reload the states of all of the devices on the network and run automations triggered by states change from unavailable to the actual state? Or is this a bug?

Supervisor 2023.07.1, OS 10.3, Frontend 20230705.1-latest, Z-Wave JS UI 1.14.0.
Using the ZST10-700 with firmware 7.18.3
The device I excluded was a Zooz Q Sensor with firmware 1.30

Because of this bug (feature?) I’m trying to change my automations to use entity state changes, so I can tell from “unavailable” instead of from a state I care about. Unfortunately, I don’t see how to do this for all devices, so some of my automations will still run the next time I exclude a device.

I was doing this, because I couldn’t get the Zooz Q Sensor to update anything on battery, even after waking it up. So, I excluded it from the network, added it back on USB power, updated the firmware and the settings I wanted, excluded it again, and then added it back on battery power. I picked this device because a youtube video said it was the best z-wave motion detector. I should have read the forums here first, since others have had trouble with them on battery. If I believe z-wave js ui, all the parameters, except the firmware version, are back to the defaults.

Unfortunately, I don’t see how to do this for all devices, so some of my automations will still run the next time I exclude a device.

I don’t think there is an official way to do this but you could use a counter to keep track of how many times devices go offline. Then you could set a condition so that if the counter has been a certain value for a certain amount of time to execute your automations.

If I believe z-wave js ui, all the parameters, except the firmware version, are back to the defaults.

This is normal. All Z-Wave devices clear their memory when excluded or reset.