|
| 1 | +import { DemoTrace } from "./types"; |
| 2 | + |
| 3 | +export const basicTrace: DemoTrace = { |
| 4 | + trace: { |
| 5 | + last_step: "action/2", |
| 6 | + run_id: "0", |
| 7 | + state: "stopped", |
| 8 | + timestamp: { |
| 9 | + start: "2021-03-25T04:36:51.223693+00:00", |
| 10 | + finish: "2021-03-25T04:36:51.266132+00:00", |
| 11 | + }, |
| 12 | + trigger: "state of input_boolean.toggle_1", |
| 13 | + domain: "automation", |
| 14 | + item_id: "1615419646544", |
| 15 | + trace: { |
| 16 | + "trigger/0": [ |
| 17 | + { |
| 18 | + path: "trigger/0", |
| 19 | + timestamp: "2021-03-25T04:36:51.223693+00:00", |
| 20 | + }, |
| 21 | + ], |
| 22 | + "condition/0": [ |
| 23 | + { |
| 24 | + path: "condition/0", |
| 25 | + timestamp: "2021-03-25T04:36:51.228243+00:00", |
| 26 | + changed_variables: { |
| 27 | + trigger: { |
| 28 | + platform: "state", |
| 29 | + entity_id: "input_boolean.toggle_1", |
| 30 | + from_state: { |
| 31 | + entity_id: "input_boolean.toggle_1", |
| 32 | + state: "on", |
| 33 | + attributes: { |
| 34 | + editable: true, |
| 35 | + friendly_name: "Toggle 1", |
| 36 | + }, |
| 37 | + last_changed: "2021-03-24T19:03:59.141440+00:00", |
| 38 | + last_updated: "2021-03-24T19:03:59.141440+00:00", |
| 39 | + context: { |
| 40 | + id: "5d0918eb379214d07554bdab6a08bcff", |
| 41 | + parent_id: null, |
| 42 | + user_id: null, |
| 43 | + }, |
| 44 | + }, |
| 45 | + to_state: { |
| 46 | + entity_id: "input_boolean.toggle_1", |
| 47 | + state: "off", |
| 48 | + attributes: { |
| 49 | + editable: true, |
| 50 | + friendly_name: "Toggle 1", |
| 51 | + }, |
| 52 | + last_changed: "2021-03-25T04:36:51.220696+00:00", |
| 53 | + last_updated: "2021-03-25T04:36:51.220696+00:00", |
| 54 | + context: { |
| 55 | + id: "664d6d261450a9ecea6738e97269a149", |
| 56 | + parent_id: null, |
| 57 | + user_id: "d1b4e89da01445fa8bc98e39fac477ca", |
| 58 | + }, |
| 59 | + }, |
| 60 | + for: null, |
| 61 | + attribute: null, |
| 62 | + description: "state of input_boolean.toggle_1", |
| 63 | + }, |
| 64 | + }, |
| 65 | + result: { |
| 66 | + result: true, |
| 67 | + }, |
| 68 | + }, |
| 69 | + ], |
| 70 | + "action/0": [ |
| 71 | + { |
| 72 | + path: "action/0", |
| 73 | + timestamp: "2021-03-25T04:36:51.243018+00:00", |
| 74 | + changed_variables: { |
| 75 | + trigger: { |
| 76 | + platform: "state", |
| 77 | + entity_id: "input_boolean.toggle_1", |
| 78 | + from_state: { |
| 79 | + entity_id: "input_boolean.toggle_1", |
| 80 | + state: "on", |
| 81 | + attributes: { |
| 82 | + editable: true, |
| 83 | + friendly_name: "Toggle 1", |
| 84 | + }, |
| 85 | + last_changed: "2021-03-24T19:03:59.141440+00:00", |
| 86 | + last_updated: "2021-03-24T19:03:59.141440+00:00", |
| 87 | + context: { |
| 88 | + id: "5d0918eb379214d07554bdab6a08bcff", |
| 89 | + parent_id: null, |
| 90 | + user_id: null, |
| 91 | + }, |
| 92 | + }, |
| 93 | + to_state: { |
| 94 | + entity_id: "input_boolean.toggle_1", |
| 95 | + state: "off", |
| 96 | + attributes: { |
| 97 | + editable: true, |
| 98 | + friendly_name: "Toggle 1", |
| 99 | + }, |
| 100 | + last_changed: "2021-03-25T04:36:51.220696+00:00", |
| 101 | + last_updated: "2021-03-25T04:36:51.220696+00:00", |
| 102 | + context: { |
| 103 | + id: "664d6d261450a9ecea6738e97269a149", |
| 104 | + parent_id: null, |
| 105 | + user_id: "d1b4e89da01445fa8bc98e39fac477ca", |
| 106 | + }, |
| 107 | + }, |
| 108 | + for: null, |
| 109 | + attribute: null, |
| 110 | + description: "state of input_boolean.toggle_1", |
| 111 | + }, |
| 112 | + context: { |
| 113 | + id: "6cfcae368e7b3686fad6c59e83ae76c9", |
| 114 | + parent_id: "664d6d261450a9ecea6738e97269a149", |
| 115 | + user_id: null, |
| 116 | + }, |
| 117 | + }, |
| 118 | + result: { |
| 119 | + params: { |
| 120 | + domain: "input_boolean", |
| 121 | + service: "toggle", |
| 122 | + service_data: {}, |
| 123 | + target: { |
| 124 | + entity_id: ["input_boolean.toggle_4"], |
| 125 | + }, |
| 126 | + }, |
| 127 | + running_script: false, |
| 128 | + limit: 10, |
| 129 | + }, |
| 130 | + }, |
| 131 | + ], |
| 132 | + "action/1": [ |
| 133 | + { |
| 134 | + path: "action/1", |
| 135 | + timestamp: "2021-03-25T04:36:51.252406+00:00", |
| 136 | + result: { |
| 137 | + choice: 0, |
| 138 | + }, |
| 139 | + }, |
| 140 | + ], |
| 141 | + "action/1/choose/0": [ |
| 142 | + { |
| 143 | + path: "action/1/choose/0", |
| 144 | + timestamp: "2021-03-25T04:36:51.254569+00:00", |
| 145 | + result: { |
| 146 | + result: true, |
| 147 | + }, |
| 148 | + }, |
| 149 | + ], |
| 150 | + "action/1/choose/0/conditions/0": [ |
| 151 | + { |
| 152 | + path: "action/1/choose/0/conditions/0", |
| 153 | + timestamp: "2021-03-25T04:36:51.254697+00:00", |
| 154 | + result: { |
| 155 | + result: true, |
| 156 | + }, |
| 157 | + }, |
| 158 | + ], |
| 159 | + "action/1/choose/0/sequence/0": [ |
| 160 | + { |
| 161 | + path: "action/1/choose/0/sequence/0", |
| 162 | + timestamp: "2021-03-25T04:36:51.257360+00:00", |
| 163 | + result: { |
| 164 | + params: { |
| 165 | + domain: "input_boolean", |
| 166 | + service: "toggle", |
| 167 | + service_data: {}, |
| 168 | + target: { |
| 169 | + entity_id: ["input_boolean.toggle_2"], |
| 170 | + }, |
| 171 | + }, |
| 172 | + running_script: false, |
| 173 | + limit: 10, |
| 174 | + }, |
| 175 | + }, |
| 176 | + ], |
| 177 | + "action/1/choose/0/sequence/1": [ |
| 178 | + { |
| 179 | + path: "action/1/choose/0/sequence/1", |
| 180 | + timestamp: "2021-03-25T04:36:51.260658+00:00", |
| 181 | + result: { |
| 182 | + params: { |
| 183 | + domain: "input_boolean", |
| 184 | + service: "toggle", |
| 185 | + service_data: {}, |
| 186 | + target: { |
| 187 | + entity_id: ["input_boolean.toggle_3"], |
| 188 | + }, |
| 189 | + }, |
| 190 | + running_script: false, |
| 191 | + limit: 10, |
| 192 | + }, |
| 193 | + }, |
| 194 | + ], |
| 195 | + "action/2": [ |
| 196 | + { |
| 197 | + path: "action/2", |
| 198 | + timestamp: "2021-03-25T04:36:51.264159+00:00", |
| 199 | + result: { |
| 200 | + params: { |
| 201 | + domain: "input_boolean", |
| 202 | + service: "toggle", |
| 203 | + service_data: {}, |
| 204 | + target: { |
| 205 | + entity_id: ["input_boolean.toggle_4"], |
| 206 | + }, |
| 207 | + }, |
| 208 | + running_script: false, |
| 209 | + limit: 10, |
| 210 | + }, |
| 211 | + }, |
| 212 | + ], |
| 213 | + }, |
| 214 | + |
| 215 | + config: { |
| 216 | + id: "1615419646544", |
| 217 | + alias: "Ensure Party mode", |
| 218 | + description: "", |
| 219 | + trigger: [ |
| 220 | + { |
| 221 | + platform: "state", |
| 222 | + entity_id: "input_boolean.toggle_1", |
| 223 | + }, |
| 224 | + ], |
| 225 | + condition: [ |
| 226 | + { |
| 227 | + condition: "template", |
| 228 | + alias: "Test if Paulus is home", |
| 229 | + value_template: "{{ true }}", |
| 230 | + }, |
| 231 | + ], |
| 232 | + action: [ |
| 233 | + { |
| 234 | + service: "input_boolean.toggle", |
| 235 | + target: { |
| 236 | + entity_id: "input_boolean.toggle_4", |
| 237 | + }, |
| 238 | + }, |
| 239 | + { |
| 240 | + choose: [ |
| 241 | + { |
| 242 | + alias: "If toggle 3 is on", |
| 243 | + conditions: [ |
| 244 | + { |
| 245 | + condition: "template", |
| 246 | + value_template: |
| 247 | + "{{ is_state('input_boolean.toggle_3', 'on') }}", |
| 248 | + }, |
| 249 | + ], |
| 250 | + sequence: [ |
| 251 | + { |
| 252 | + service: "input_boolean.toggle", |
| 253 | + alias: "Toggle 2 while 3 is on", |
| 254 | + target: { |
| 255 | + entity_id: "input_boolean.toggle_2", |
| 256 | + }, |
| 257 | + }, |
| 258 | + { |
| 259 | + service: "input_boolean.toggle", |
| 260 | + alias: "Toggle 3", |
| 261 | + target: { |
| 262 | + entity_id: "input_boolean.toggle_3", |
| 263 | + }, |
| 264 | + }, |
| 265 | + ], |
| 266 | + }, |
| 267 | + ], |
| 268 | + default: [ |
| 269 | + { |
| 270 | + service: "input_boolean.toggle", |
| 271 | + alias: "Toggle 2", |
| 272 | + target: { |
| 273 | + entity_id: "input_boolean.toggle_2", |
| 274 | + }, |
| 275 | + }, |
| 276 | + ], |
| 277 | + }, |
| 278 | + { |
| 279 | + service: "input_boolean.toggle", |
| 280 | + target: { |
| 281 | + entity_id: "input_boolean.toggle_4", |
| 282 | + }, |
| 283 | + }, |
| 284 | + ], |
| 285 | + mode: "single", |
| 286 | + }, |
| 287 | + context: { |
| 288 | + id: "6cfcae368e7b3686fad6c59e83ae76c9", |
| 289 | + parent_id: "664d6d261450a9ecea6738e97269a149", |
| 290 | + user_id: null, |
| 291 | + }, |
| 292 | + script_execution: "finished", |
| 293 | + }, |
| 294 | + logbookEntries: [ |
| 295 | + { |
| 296 | + name: "Ensure Party mode", |
| 297 | + message: "has been triggered by state of input_boolean.toggle_1", |
| 298 | + source: "state of input_boolean.toggle_1", |
| 299 | + entity_id: "automation.toggle_toggles", |
| 300 | + context_id: "6cfcae368e7b3686fad6c59e83ae76c9", |
| 301 | + when: "2021-03-25T04:36:51.240832+00:00", |
| 302 | + domain: "automation", |
| 303 | + }, |
| 304 | + { |
| 305 | + when: "2021-03-25T04:36:51.249828+00:00", |
| 306 | + name: "Toggle 4", |
| 307 | + state: "on", |
| 308 | + entity_id: "input_boolean.toggle_4", |
| 309 | + context_entity_id: "automation.toggle_toggles", |
| 310 | + context_entity_id_name: "Ensure Party mode", |
| 311 | + context_event_type: "automation_triggered", |
| 312 | + context_domain: "automation", |
| 313 | + context_name: "Ensure Party mode", |
| 314 | + }, |
| 315 | + { |
| 316 | + when: "2021-03-25T04:36:51.258947+00:00", |
| 317 | + name: "Toggle 2", |
| 318 | + state: "on", |
| 319 | + entity_id: "input_boolean.toggle_2", |
| 320 | + context_entity_id: "automation.toggle_toggles", |
| 321 | + context_entity_id_name: "Ensure Party mode", |
| 322 | + context_event_type: "automation_triggered", |
| 323 | + context_domain: "automation", |
| 324 | + context_name: "Ensure Party mode", |
| 325 | + }, |
| 326 | + { |
| 327 | + when: "2021-03-25T04:36:51.261806+00:00", |
| 328 | + name: "Toggle 3", |
| 329 | + state: "off", |
| 330 | + entity_id: "input_boolean.toggle_3", |
| 331 | + context_entity_id: "automation.toggle_toggles", |
| 332 | + context_entity_id_name: "Ensure Party mode", |
| 333 | + context_event_type: "automation_triggered", |
| 334 | + context_domain: "automation", |
| 335 | + context_name: "Ensure Party mode", |
| 336 | + }, |
| 337 | + { |
| 338 | + when: "2021-03-25T04:36:51.265246+00:00", |
| 339 | + name: "Toggle 4", |
| 340 | + state: "off", |
| 341 | + entity_id: "input_boolean.toggle_4", |
| 342 | + context_entity_id: "automation.toggle_toggles", |
| 343 | + context_entity_id_name: "Ensure Party mode", |
| 344 | + context_event_type: "automation_triggered", |
| 345 | + context_domain: "automation", |
| 346 | + context_name: "Ensure Party mode", |
| 347 | + }, |
| 348 | + ], |
| 349 | +}; |
0 commit comments