MySensors errors in most recent version of HASSIO

Hi,

I’ve got HASSIO 0.67.1 and I’m using mysensors without issue until lately. My sensors seem to be working as far as I can tell but, I keep getting this error recently:

Failed config
mysensors:

  • Invalid config for [mysensors]: /config directory does not exist or is not writeable for dictionary value @ data[‘mysensors’][‘gateways’][0][‘persistence_file’]. Got ‘mysensors.json’
    not a valid value for dictionary value @ data[‘mysensors’][‘gateways’][0][‘device’]. Got ‘/dev/ttyUSB0’. (See /config/configuration.yaml, line 144). Please check the docs at MySensors - Home Assistant

I’ve tried changing a few things in my config to see if that makes a difference, e.g. the path:

From: ‘/config/mysensors.json’
To: ‘mysensors.json’

Both seem to work and I even deleted the file between attempts so it would be regenerated, which it was. Like I say it all seems to work but I keep getting this error and I’m unsure as to why.

This is my config currently:

mysensors:
  gateways:
    - device: '/dev/ttyUSB0'
      persistence_file: '/config/mysensors.json'
      baud_rate: 115200
  optimistic: true
  persistence: true
  retain: true
  version: '2.0'

It looks like the example and the documentation doesn’t agree with each other.

Documentation claims ‘persistence_file’ does not go under the device.

Example claims ‘persistence_file’ does go under the device.

Try moving persistence_file from the device and place it next to persistence.

just looked at the source, the documentation is wrong, the example is correct.

I’ve got a PR up for correcting the docs.

The config validation in Hass.io doesn’t seem reliable for mysensors. I’m not sure why.

1 Like