77 lines
2.6 KiB
JSON
Executable File
77 lines
2.6 KiB
JSON
Executable File
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cognitive-agent.local/domains/climate/function-parameters.schema.json",
|
|
"title": "ClimateFunctionParameters",
|
|
"type": "object",
|
|
"properties": {
|
|
"spec": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {"const": "climate"},
|
|
"operations": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"capability": {"enum": ["climate.set_power", "climate.set_ac", "climate.set_front_defrost"]},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["state"],
|
|
"properties": {"state": {"enum": ["on", "off"]}}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "climate.set_temperature"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["temperature_c"],
|
|
"properties": {"temperature_c": {"type": "number", "minimum": 18, "maximum": 32}}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "climate.set_fan_level"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["level"],
|
|
"properties": {"level": {"type": "integer", "minimum": 0, "maximum": 7}}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "climate.set_cycle_mode"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode"],
|
|
"properties": {"mode": {"enum": ["internal", "external"]}}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"capability": {"const": "climate.set_outlet_mode"},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode"],
|
|
"properties": {"mode": {"enum": ["face", "feet"]}}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|