import { s } from "../schema.js"; import { defineInterface } from "../types.js"; /** Both directives turn a light that is off on, at the brightness asked for (alexa-brightnesscontroller.html). */ export const BrightnessController = defineInterface({ namespace: "Alexa.BrightnessController", version: "3", doc: "https://developer.amazon.com/docs/alexaplus/device-apis/alexa-brightnesscontroller.html", kind: "controller", tier: 1, instanced: false, properties: { brightness: { name: "brightness", value: s.number({ min: 0, max: 100, integer: true }) }, }, directives: { SetBrightness: { name: "SetBrightness", payload: s.object({ brightness: s.number({ min: 0, max: 100, integer: true }) }), }, AdjustBrightness: { name: "AdjustBrightness", payload: s.object({ brightnessDelta: s.number({ min: -100, max: 100, integer: true }) }), }, }, });