86 lines
2.9 KiB
JSON
Executable File
86 lines
2.9 KiB
JSON
Executable File
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cognitive-agent.local/domains/ambient_light/function-parameters.schema.json",
|
|
"title": "AmbientLightFunctionParameters",
|
|
"type": "object",
|
|
"properties": {
|
|
"spec": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {"const": "ambient_light"},
|
|
"operations": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "ambient_light.set_power"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["state"],
|
|
"properties": {"state": {"enum": ["on", "off"]}}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "ambient_light.set_color_index"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["color_index"],
|
|
"properties": {
|
|
"color_index": {"type": "integer", "minimum": 1, "maximum": 127}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "ambient_light.set_brightness_level"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["brightness_level"],
|
|
"properties": {
|
|
"brightness_level": {"type": "integer", "minimum": 1, "maximum": 5}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "ambient_light.set_illumination"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["color_hex", "brightness_pct"],
|
|
"properties": {
|
|
"color_hex": {"type": "string", "pattern": "^#[0-9A-Fa-f]{6}$"},
|
|
"brightness_pct": {"type": "integer", "minimum": 0, "maximum": 100}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "ambient_light.set_mode"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode"],
|
|
"properties": {
|
|
"mode": {"enum": ["camping", "rest", "cinema", "meditation", "romantic", "off", "on"]}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|