1. {
  2. "trace": {
  3. "last_step": "sequence/0",
  4. "run_id": "38ae128735cee8919eaffcd20b539386",
  5. "state": "stopped",
  6. "script_execution": "finished",
  7. "timestamp": {
  8. "start": "2025-04-12T11:50:33.519088+00:00",
  9. "finish": "2025-04-12T11:50:33.538419+00:00"
  10. },
  11. "domain": "script",
  12. "item_id": "set_smartfox_aout_mode",
  13. "trace": {
  14. "sequence/0": [
  15. {
  16. "path": "sequence/0",
  17. "timestamp": "2025-04-12T11:50:33.521247+00:00",
  18. "changed_variables": {
  19. "aout_mode_off": [],
  20. "aout_mode_manual": [
  21. 1
  22. ],
  23. "aout_mode_auto": [
  24. 2
  25. ],
  26. "this": {
  27. "entity_id": "script.set_smartfox_aout_mode",
  28. "state": "off",
  29. "attributes": {
  30. "last_triggered": "2025-04-12T11:49:12.871768+00:00",
  31. "mode": "single",
  32. "current": 0,
  33. "icon": "mdi:car-cruise-control",
  34. "friendly_name": "Set Smartfox Aout Mode"
  35. },
  36. "last_changed": "2025-04-12T11:50:01.384032+00:00",
  37. "last_reported": "2025-04-12T11:50:01.384032+00:00",
  38. "last_updated": "2025-04-12T11:50:01.384032+00:00",
  39. "context": {
  40. "id": "01JRMXBMX8S3SPRASRBTC0YWS1",
  41. "parent_id": null,
  42. "user_id": null
  43. }
  44. },
  45. "mode_in": "Deactivate",
  46. "context": {
  47. "id": "01JRMXCM9E5M1S2356YAPXEA61",
  48. "parent_id": null,
  49. "user_id": "fdcca8628e5f4938850208925b12c77c"
  50. }
  51. },
  52. "result": {
  53. "params": {
  54. "domain": "modbus",
  55. "service": "write_register",
  56. "service_data": {
  57. "hub": "SmartfoxPro2",
  58. "slave": 1,
  59. "address": 42206,
  60. "value": []
  61. },
  62. "target": {}
  63. },
  64. "running_script": false
  65. }
  66. }
  67. ]
  68. },
  69. "config": {
  70. "alias": "Set Smartfox Aout Mode",
  71. "description": "Set the Aout mode of Smartfox",
  72. "variables": {
  73. "aout_mode_off": [],
  74. "aout_mode_manual": [
  75. 1
  76. ],
  77. "aout_mode_auto": [
  78. 2
  79. ]
  80. },
  81. "fields": {
  82. "mode_in": {
  83. "selector": {
  84. "select": {
  85. "options": [
  86. "Deactivate",
  87. "Manual",
  88. "Auto"
  89. ],
  90. "multiple": false
  91. }
  92. },
  93. "required": true,
  94. "description": "The Mode to set the Aout to",
  95. "name": "mode_in"
  96. }
  97. },
  98. "sequence": [
  99. {
  100. "service": "modbus.write_register",
  101. "data": {
  102. "hub": "SmartfoxPro2",
  103. "slave": 1,
  104. "address": 42206,
  105. "value": "{% if mode_in == \"Deactivate\" %}\n {{aout_mode_off}}\n{% elif mode_in == \"Manual\" %}\n {{aout_mode_manual}}\n{% elif mode_in == \"Auto\" %}\n {{aout_mode_auto}}\n{% else %}\n {{aout_mode_auto}}\n{% endif %}\n"
  106. }
  107. }
  108. ],
  109. "mode": "single",
  110. "icon": "mdi:car-cruise-control"
  111. },
  112. "blueprint_inputs": null,
  113. "context": {
  114. "id": "01JRMXCM9E5M1S2356YAPXEA61",
  115. "parent_id": null,
  116. "user_id": "fdcca8628e5f4938850208925b12c77c"
  117. }
  118. },
  119. "logbookEntries": [
  120. {
  121. "when": 1744458633.519808,
  122. "state": "on",
  123. "entity_id": "script.set_smartfox_aout_mode",
  124. "icon": "mdi:car-cruise-control",
  125. "context_user_id": "fdcca8628e5f4938850208925b12c77c"
  126. },
  127. {
  128. "when": 1744458633.534149,
  129. "state": "off",
  130. "entity_id": "script.set_smartfox_aout_mode",
  131. "icon": "mdi:car-cruise-control",
  132. "context_user_id": "fdcca8628e5f4938850208925b12c77c",
  133. "context_state": "on",
  134. "context_entity_id": "script.set_smartfox_aout_mode"
  135. }
  136. ]
  137. }