Merge pull request #12 from adafruit/tylerdcooper-patch-8
docs: any data trigger block
This commit is contained in:
commit
ecd4d4ed79
1 changed files with 2 additions and 10 deletions
|
|
@ -5,28 +5,23 @@ export default {
|
|||
name: "Any Data",
|
||||
colour: 30,
|
||||
inputsInline: true,
|
||||
description: "Run this action when a Feed receives a new data point.",
|
||||
|
||||
description: "The simplest trigger - runs your Action every single time ANY new data arrives at a feed, regardless of what the value is. Perfect for logging all activity ('record every sensor reading'), acknowledging data receipt ('send confirmation for every message'), or triggering workflows that need to process all incoming data. No conditions, no filtering - just pure data arrival detection.",
|
||||
connections: {
|
||||
mode: "statement",
|
||||
output: "trigger",
|
||||
next: "trigger"
|
||||
},
|
||||
|
||||
mixins: ['replaceDropdownOptions'],
|
||||
extensions: ['populateFeedDropdown'],
|
||||
|
||||
template: "When %FEED_KEY gets any data |LEFT",
|
||||
|
||||
fields: {
|
||||
FEED_KEY: {
|
||||
description: "the Feed to watch for new data points",
|
||||
description: "Choose which feed to monitor for activity. Every single data point that arrives at this feed will trigger your Action - whether it's a number, text, true/false, or any other value type.",
|
||||
options: [
|
||||
[ "Loading Feeds...", ""]
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
generators: {
|
||||
json: block => {
|
||||
const
|
||||
|
|
@ -34,15 +29,12 @@ export default {
|
|||
payload = JSON.stringify({
|
||||
whenData: { feed }
|
||||
})
|
||||
|
||||
return payload
|
||||
}
|
||||
},
|
||||
|
||||
regenerators: {
|
||||
json: blockObject => {
|
||||
const payload = blockObject.whenData
|
||||
|
||||
return {
|
||||
type: "when_data",
|
||||
fields: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue