SOLBVED: Where does HomeAssistant/OpenZWave cache zwave port?

tl;dr usb_path is ignored in config for HA > 0.81

I’m in the process of migrating from a Raspberry Pi based HA setup which used a ZWave.Me controller, on port /dev/ttyAMA0 to a NUC and a ZWave USB stick on port /dev/ttyAMC0.

I started HA several times before I got as far as plugging in the zwave stick and it seems to have cached the original value I had in config from the Pi.

The odd thing is, even when I destroy the container & bring it back up, it still keeps the old config in place, even though the config in HA is now correct.

zwave:
  usb_path: /dev/ttyACM0
  debug: true

I’ve grep’d the HA config folder for the old port, but nothing comes up, could it be encoded in a file somewhere?

Here’s the error from the HA logs:

home-assistant   | 2019-02-12 15:48:55 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Z-Wave (import from configuration.yaml) for zwave
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/local/lib/python3.6/site-packages/openzwave/option.py", line 78, in __init__
home-assistant   |     raise ZWaveException(u"Can't find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
home-assistant   | openzwave.object.ZWaveException: "Zwave Generic Exception : Can't find device /dev/ttyAMA0 : ['NoneType: None\\n']"
home-assistant   |
home-assistant   | During handling of the above exception, another exception occurred:
home-assistant   |
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/app/homeassistant/config_entries.py", line 258, in async_setup
home-assistant   |     result = await component.async_setup_entry(hass, self)
home-assistant   |   File "/usr/src/app/homeassistant/components/zwave/__init__.py", line 283, in async_setup_entry
home-assistant   |     config_path=config.get(CONF_CONFIG_PATH))
home-assistant   |   File "/usr/local/lib/python3.6/site-packages/openzwave/option.py", line 81, in __init__
home-assistant   |     raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
home-assistant   | openzwave.object.ZWaveException: 'Zwave Generic Exception : Error when retrieving device /dev/ttyAMA0 : [\'Traceback (most recent call last):\\n\', \'  File "/usr/local/lib/python3.6/site-packages/openzwave/option.py", line 78, in __init__\\n    raise ZWaveException(u"Can\\\'t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\\n\', \'openzwave.object.ZWaveException: "Zwave Generic Exception : Can\\\'t find device /dev/ttyAMA0 : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'

tl;dr usb_path is ignored in config for HA > 0.81

It’s because the version of HA I originally set up was pre- 0.81, so I had no idea the config for z-wave had moved into an integration. /dev/AMA0 is the default it was trying to use.