[docs] add Examples to each trigger/action

This commit is contained in:
2023-10-31 00:41:59 +01:00
parent 06534e0bbd
commit 8898565ff8
8 changed files with 98 additions and 6 deletions

View File

@@ -88,6 +88,22 @@ func (p UsbDisconnect) GetDescription() string {
return "Triggers when given usb drive is disconnected"
}
func (p UsbDisconnect) GetExample() string {
return `
{
"type": "UsbDisconnect",
"name": "Example Trigger",
"options": {
"deviceId": "ata-Samsung_SSD_860_EVO_1TB_S4AALKWJDI102",
"waitTillConnected": true
}
"actions": [
]
}
`
}
func (p UsbDisconnect) GetOptions() []internal.ConfigOption {
return []internal.ConfigOption{
{"waitTillConnected", "bool", "Only trigger when device was connected before", "true"},