Skip to content

Adding a second dimswitch #21

@Ev15

Description

@Ev15

Hi,
I am trying to add multiple dimswitches in one sketch like this:
SinricProDimSwitch &myDimSwitch = SinricPro[DIMSWITCH_ID];
SinricProDimSwitch &myDimSwitch2 = SinricPro[DIMSWITCH_ID2];

// set callback function to device
myDimSwitch.onPowerState(onPowerState);
myDimSwitch.onPowerLevel(onPowerLevel);
myDimSwitch.onAdjustPowerLevel(onAdjustPowerLevel);

myDimSwitch2.onPowerState(onPowerState);
myDimSwitch2.onPowerLevel(onPowerLevel);
myDimSwitch2.onAdjustPowerLevel(onAdjustPowerLevel);

I can switch them on and off with no problem but when using the dimfunction of dimswitch2 the deviceId of switch 1 is returned.

Thanks, Ed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfixedBug has been fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions