UNPKG

iobroker.lightcontrol

Version:

Light control of lamps from various manufacturers

513 lines (508 loc) 9.36 kB
const TestTemplateLamps = { Lamp1: { power: { read: true, write: true, name: "Power", type: "boolean", role: "switch.power", def: false, }, bri: { read: true, write: true, name: "Brightness", type: "number", role: "level.brightness", def: 100, min: 0, max: 100, unit: "%", custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "bri", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Spot", }, }, }, sat: { read: true, write: true, name: "Saturation", type: "number", role: "level.sat", def: 0, min: 0, max: 100, custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "sat", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Spot", }, }, }, ct: { read: true, write: true, name: "Colortemperature", type: "number", role: "level.color.temperature", def: 100, min: 0, max: 100, custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "ct", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Spot", }, }, }, colorHEX: { read: true, write: true, name: "Color Hex", type: "string", role: "level.color.rgb", def: "#FFFFFF", custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "color", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Spot", }, }, }, colorModeSwitch: { read: true, write: true, name: "Color ModeSwitch", type: "boolean", role: "value", def: "false", custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "modeswitch", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Spot", }, }, }, }, Lamp2: { power: { read: true, write: true, name: "Power", type: "boolean", role: "switch.power", def: false, custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "power", onVal: true, offVal: false, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Decke", }, }, }, bri: { read: true, write: true, name: "Brightness", type: "number", role: "level.brightness", def: 254, min: 0, max: 254, custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "254", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: false, type: "light", func: "bri", onVal: 1, offVal: 0, minVal: 0, maxVal: 254, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Decke", }, }, }, sat: { read: true, write: true, name: "Saturation", type: "number", role: "level.sat", def: 0, min: 0, max: 100, custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "sat", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Decke", }, }, }, ct: { read: true, write: true, name: "Colortemperature", type: "number", role: "level.color.temperature", def: 2700, min: 2700, max: 6500, unit: "K", custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "ct", onVal: 1, offVal: 0, minVal: 2700, maxVal: 6500, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Decke", }, }, }, colorRGB: { read: true, write: true, name: "Color RGB", type: "number", role: "level.color.RGB", def: 250, }, colorModeSwitch: { read: true, write: true, name: "Color ModeSwitch", type: "boolean", role: "value", def: "false", custom: { "lightcontrol.0": { enabled: true, CtReverse: false, defaultBri: "100", whiteModeVal: "false", colorModeVal: "true", colorType: "hex", defaultColor: "#FFFFFF", sendCt: true, sendSat: true, sendColor: true, sendModeswitch: true, useBri: true, type: "light", func: "modeswitch", onVal: 1, offVal: 0, minVal: 0, maxVal: 100, motionVal: "On", noMotionVal: "Off", group: "Wohnzimmer", description: "Decke", }, }, }, }, Lamp3: { power: { read: true, write: true, name: "Power", type: "boolean", role: "switch.power", def: false, }, bri: { read: true, write: true, name: "Brightness", type: "number", role: "level.brightness", def: 100, min: 0, max: 100, unit: "%", }, sat: { read: true, write: true, name: "Saturation", type: "number", role: "level.sat", def: 0, min: 0, max: 100, }, ct: { read: true, write: true, name: "Colortemperature", type: "number", role: "level.color.temperature", def: 300, unit: "K", }, colorXY: { read: true, write: true, name: "Color XY", type: "string", role: "level.color.xy", def: "[0.4992,0.418]", }, colorModeSwitch: { read: true, write: true, name: "Color ModeSwitch", type: "boolean", role: "value", def: "false", }, }, }; const TestTemplateMotionSensors = { MotionSensor1: { read: true, write: true, name: "Motion Sensor 1", type: "boolean", role: "sensor.motion", def: false, }, MotionSensor2: { read: true, write: true, name: "Motion Sensor 2", type: "boolean", role: "sensor.motion", def: false, }, MotionSensor3: { read: true, write: true, name: "Motion Sensor 3", type: "boolean", role: "sensor.motion", def: false, }, }; const TestTemplateLuxSensors = { LuxSensor1: { read: true, write: true, name: "Lux Sensor 1", type: "number", role: "value.brightness", def: 50, }, LuxSensor2: { read: true, write: true, name: "Lux Sensor 2", type: "number", role: "value.brightness", def: 50, }, GlobalLuxSensor: { read: true, write: true, name: "Lux Sensor 3", type: "number", role: "value.brightness", def: 50, }, }; const TestTemplatePresence = { PresenceCountDp: { read: true, write: true, name: "Presence Counter", type: "number", role: "value", def: 0, }, IsPresenceDp: { read: true, write: true, name: "IsPresenceDp", type: "boolean", role: "state", def: true, }, }; module.exports = { TestTemplateLamps, TestTemplateMotionSensors, TestTemplateLuxSensors, TestTemplatePresence, };