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

**URL:** <https://community.homey.app/t/device-should-be-object-properties-settings-type/102871>\
**Category:** Developers\
**Created:** [February 1, 2024, 1:36am UTC](https://community.homey.app/t/device-should-be-object-properties-settings-type/102871 "2024-02-01T01:36:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas\_Enge](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonas_enge/32/81300_2.png) [@Jonas\_Enge](https://community.homey.app/u/Jonas_Enge)\
**Post date:** [February 1, 2024, 1:36am UTC](https://community.homey.app/t/device-should-be-object-properties-settings-type/102871/1 "2024-02-01T01:36:02Z")

</div>

I created this project some months ago: [GitHub - maccyber/homey-nissan-leaf: Adds support for Nissan Leaf pre May 2019 in homey](https://github.com/maccyber/homey-nissan-leaf)  
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)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/1/b1409c0a6fe54cf260bc89d008fc6092c69c00e1.png)

See thread: [Nissan (leaf) - #13 by cscheiene](https://community.homey.app/t/nissan-leaf/24641/13)

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

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 1, 2024, 6:28am UTC](https://community.homey.app/t/device-should-be-object-properties-settings-type/102871/2 "2024-02-01T06:28:49Z")

</div>

> [@Jonas\_Enge](#):
>
> Something I’m doing wrong about the settings?

Yes, you’re declaring it [as an array](https://github.com/maccyber/homey-nissan-leaf/blob/main/drivers/leaf/driver.js#L58-L63), not an object.

It should look like this:

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

```

Which is short for:

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

```

---

<div class="post-metadata">

**Author:** ![Jonas\_Enge](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonas_enge/32/81300_2.png) [@Jonas\_Enge](https://community.homey.app/u/Jonas_Enge)\
**Post date:** [February 1, 2024, 6:30pm UTC](https://community.homey.app/t/device-should-be-object-properties-settings-type/102871/3 "2024-02-01T18:30:39Z")

</div>

Thanks @robertklep. That worked 🙂
