This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision |
| indigo_2023.2_documentation:overview [2025/10/21 20:57] – [Insert Event Data into Variable] davel17 | indigo_2023.2_documentation:overview [2025/10/21 22:04] (current) – [Insert Event Data into Variable] davel17 |
|---|
| Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the format string as defined in the [[http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior|Python datetime string formatting]] documentation (see the chart at the bottom for format specifiers). The format in the **''Format string''** field is the default format. | Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the format string as defined in the [[http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior|Python datetime string formatting]] documentation (see the chart at the bottom for format specifiers). The format in the **''Format string''** field is the default format. |
| |
| === Insert Event Data into Variable === | |
| {{:indigo_2023.2_documentation:insert_event_data_into_variable.png?600|}} | |
| |
| Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the ''**Path specifier**'' if you want to access specific parts of the event data. | |
| |
| Path specifiers use a specific syntax and require knowledge of the event data you'll be receiving from the event. For example, given this Indigo event data: | |
| <code> | |
| { | |
| "foo": 1214985350, | |
| "bar": "Baz", | |
| "data": ["Thing 1", "Thing 2"], # a list | |
| "more_data": {'a': 1, 'b': 2}, # a dictionary | |
| "timestamp": "2025-08-07T14:32:21", | |
| } | |
| </code> | |
| |
| You could use path specifiers like this: | |
| |
| <code> | |
| "source" equals "server" | |
| "data[0]" equals "Thing 1" | |
| "more_data['b'] equals 2 | |
| </code> | |
| |
| If the event data is more complex, the path specifiers are chained together like this: | |
| |
| === Toggle Variable === | === Toggle Variable === |