Z-wave error: has unit of measure and device class enum

I’m getting this ominous error message in the core logs:

ValueError: sensor: sensor.outdoor_motion_sensor_manual_motion_re_trigger_time_setting has a unit of measurement and thus indicating it has a numeric value, it has the non-numeric device class: enum
The yaml from Settings–>Tools–>States

restored: true
options:
  - 5 seconds (Test mode)
device_class: enum
friendly_name: Currant House Outdoor Motion Sensor Manual Motion Re-Trigger Time Setting
supported_features: 0
unit_of_measurement: seconds

This was automatically created when I added the device.
Any idea what the problem is?

Yeah, it has a unit_of_measurement when it shouldn’t have that.

Your entity is coming through as a zwave list sensor

Which does not set unit_of_measurement at any point. If you have the option in the UI to remove or change the unit of measurement, change it to None.

I deleted it, disconnected it from z-wave, factory reset, restarted HA, restarted the virtual machine and otherwise spent a couple of hours thrashing. Eventually I got it connected again.