Skip to content

Add mapping value #166

@StefanoMartin

Description

@StefanoMartin

It would be nice to have a way to create a mapping value easily.
At the moment we have something like this:

this.chargeLimit = await device.createNumberValue({
      name: 'charge_limit',
      permission: 'rw',
      type: 'mapping',
      min: 0,
      max: 2,
      unit: '',
      mapping: {"0": "action1", "1": "action2", "2": "action3"}
    })

I suggest to create something like this:

this.chargeLimit = await device.createMappingValue({
      name: 'charge_limit',
      permission: 'rw',
      mapping: ["action1", "action2", "action3"]
    })

Also the Wappsto UI should support this one instead of providing a slider.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions