Public source validation / validate (push) Failing after 3m8s
53 lines
1.1 KiB
JSON
53 lines
1.1 KiB
JSON
{
|
|
"schemaVersion": 1,
|
|
"id": "ups-on-battery",
|
|
"name": "UPS on battery",
|
|
"description": "Optional UPS source changes power state.",
|
|
"initialState": {
|
|
"ups": {
|
|
"available": true,
|
|
"status": "online",
|
|
"chargePercent": 100,
|
|
"runtimeSeconds": 3600
|
|
}
|
|
},
|
|
"timeline": [
|
|
{
|
|
"atSeconds": 30,
|
|
"action": "set-entity-status",
|
|
"payload": {
|
|
"entity": "fixture-ups",
|
|
"status": "attention",
|
|
"facts": {
|
|
"powerState": "on-battery",
|
|
"chargePercent": 96,
|
|
"runtimeSeconds": 3300
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"atSeconds": 300,
|
|
"action": "set-entity-status",
|
|
"payload": {
|
|
"entity": "fixture-ups",
|
|
"status": "operational",
|
|
"facts": {
|
|
"powerState": "online",
|
|
"chargePercent": 95,
|
|
"runtimeSeconds": 3500
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"expectedOutcomes": [
|
|
{
|
|
"bySeconds": 60,
|
|
"assertion": "UPS is attention with on-battery reason and runtime shown."
|
|
},
|
|
{
|
|
"bySeconds": 360,
|
|
"assertion": "Recovery is recorded as an event."
|
|
}
|
|
]
|
|
}
|