Device: should be object (#/properties/settings/type)

I created this project some months ago: GitHub - maccyber/homey-nissan-leaf: Adds support for Nissan Leaf pre May 2019 in homey
For me the app works fine, but when other people try to add their car, they get the error message:

device: should be object (#/properties/settings/type)

See thread: Nissan (leaf) - #13 by cscheiene

Any idea why? Something I’m doing wrong about the settings?

Yes, you’re declaring it as an array, not an object.

It should look like this:

const settings = {
  username,
  password,
  pollInterval,
  regionCode,
};

Which is short for:

const settings = {
  username : username,
  password : password,
  pollInterval : pollInterval,
  regionCode : regionCode,
};

Thanks @robertklep. That worked :slight_smile:

1 Like