我正在努力让 Alexa 使用两个按钮显示闪烁模式,每个按钮显示一秒钟的橙色,每个按钮显示半秒钟的黑色缓冲区。所以模式将是:
按钮 1 为 1 秒的橙色和半秒的黑色。
按钮 2 为一秒钟的橙色和半秒钟的黑色。
按钮 2 为一秒钟的橙色和半秒钟的黑色。
按钮 1 为一秒橙色和半秒黑色。
我正在尝试堆叠它们,但它从来没有真正起作用。这是我正在使用的代码:
this.response._addDirective({
"type": "GadgetController.SetLight",
"version": 1,
"targetGadgets": ["amzn1.ask.gadget.XXX1"],
"parameters": {
"triggerEvent": "none",
"triggerEventTimeMs": 0,
"animations": [{
"repeat": 1,
"targetLights": ["1"],
"sequence": [
{
"durationMs": 1000,
"blend": false,
"color": "000000"
},
{
"durationMs": 1000,
"blend": false,
"color": "b32d00"
}
]
}]
}
});
this.response._addDirective({
"type": "GadgetController.SetLight",
"version": 1,
"targetGadgets": ["amzn1.ask.gadget.XXXX2"],
"parameters": {
"triggerEvent": "none",
"triggerEventTimeMs": 0,
"animations": [{
"repeat": 1,
"targetLights": ["1"],
"sequence": [{
"durationMs": 1500,
"blend": false,
"color": "000000"
},
{
"durationMs": 1000,
"blend": false,
"color": "b32d00"
}
]
}]
}
});
this.response._addDirective({
"type": "GadgetController.SetLight",
"version": 1,
"targetGadgets": ["amzn1.ask.gadget.XXXX2"],
"parameters": {
"triggerEvent": "none",
"triggerEventTimeMs": 0,
"animations": [{
"repeat": 1,
"targetLights": ["1"],
"sequence": [
{
"durationMs": 2000,
"blend": false,
"color": "000000"
},
{
"durationMs": 1000,
"blend": false,
"color": "b32d00"
}
]
}]
}
});
this.response._addDirective({
"type": "GadgetController.SetLight",
"version": 1,
"targetGadgets": ["amzn1.ask.gadget.XXXX1"],
"parameters": {
"triggerEvent": "none",
"triggerEventTimeMs": 0,
"animations": [{
"repeat": 1,
"targetLights": ["1"],
"sequence": [
{
"durationMs": 2500,
"blend": false,
"color": "000000"
},
{
"durationMs": 1000,
"blend": false,
"color": "b32d00"
}
]
}]
}
});
我猜我的问题在于“无”触发事件相互抵消,但必须有办法做到这一点。有什么想法吗?