This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"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."
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user