0
Under review
Vladimir Bykov 3 months ago • updated 2 months ago 4

I add new Event with default value 30


var temperatureNumber =  
  {
        Type: IR.ADVANCED_NUMBER,
        Name: "Temperature",
        Min: 0,
        Max: 100
  };
   
  subDevice = module.GetSubDevice("Channel 1");
  subDevice.AddEvent("More than", "Drivers.Module 4t.Channel 1", false, '>', "30", temperatureNumber);
But in i3Lite when I add new event value selector starts from 0, not from 30.


Under review

looks like a bug. We fix it

Sorry, i was wrong, it is not a bug. In Add event you write a default value for event and if you want to create default value to field, then you should use:

var temperatureNumber =

{

Type: IR.ADVANCED_NUMBER,

Name: "Temperature",

Min: 0,

Max: 100,

Default: 30

};


It works for IR.ADVANCED_NUMBER. But not for IR.ADVANCED_SLIDER.

And, please, specify for what we need argument "Default" in SubDevice.AddEvent method

So, for what do we need argument "Default" in SubDevice.AddEvent method?