私は、Alexa に 2 つのボタンをそれぞれ 1 秒間オレンジ色に、0.5 秒間の黒いバッファーを使用して点滅パターンを表示させることに取り組んでいます。したがって、パターンは次のようになります。
ボタン 1 を 1 秒間オレンジ色に、0.5 秒間黒色にします。
ボタン 2 をオレンジで 1 秒、黒で 0.5 秒。
ボタン 2 をオレンジで 1 秒、黒で 0.5 秒。
ボタン 1 をオレンジで 1 秒、黒で 0.5 秒。
それらを積み重ねようとしていますが、実際にはうまくいきません。私が使用しているコードは次のとおりです。
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"
}
]
}]
}
});
私の問題は、「なし」のトリガーイベントが互いに打ち消し合うことにあると思いますが、それを行う方法が必要です。何かご意見は?