Button
A stateless, duration-aware press action that makes no claim about target state.
https://hometruth.ai/schemas/button · Button
Instances
- Vacuum cleanRoborock vacuum action · Great room
- Vacuum dockRoborock vacuum action · Great room
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hometruth.ai/schemas/button",
"title": "Button",
"description": "A stateless action that can be pressed once or, when advertised, held for a bounded duration. A successful press does not imply observable target state.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"state": {
"type": "object",
"additionalProperties": false,
"properties": {
"availability": {
"enum": [
"online",
"offline",
"degraded",
"unknown"
]
},
"observedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"availability"
]
},
"actions": {
"type": "object",
"additionalProperties": false,
"properties": {
"press": {
"type": "object",
"additionalProperties": false,
"properties": {
"maximumDurationMs": {
"type": "integer",
"minimum": 0,
"maximum": 86400000
}
}
}
},
"required": [
"press"
]
}
},
"required": [
"id",
"state",
"actions"
],
"examples": [
{
"id": "candles-on",
"state": {
"availability": "online"
},
"actions": {
"press": {
"maximumDurationMs": 60000
}
}
}
]
}