Snippet content copied to clipboard.
Are you sure to delete this snippet? No, don't delete
  1. {
  2. "trace": {
  3. "last_step": "sequence/0",
  4. "run_id": "51e9035c597884b5922a18b77456d845",
  5. "state": "stopped",
  6. "script_execution": "finished",
  7. "timestamp": {
  8. "start": "2025-04-12T11:49:12.871393+00:00",
  9. "finish": "2025-04-12T11:49:12.889878+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:49:12.873029+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.811253+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:49:12.824798+00:00",
  37. "last_reported": "2025-04-12T11:49:12.824798+00:00",
  38. "last_updated": "2025-04-12T11:49:12.824798+00:00",
  39. "context": {
  40. "id": "01JRMXA5FAGWFBHYEQ381KFD6G",
  41. "parent_id": null,
  42. "user_id": "fdcca8628e5f4938850208925b12c77c"
  43. }
  44. },
  45. "mode_in": "Manual",
  46. "context": {
  47. "id": "01JRMXA5H3T5EH1J628NJVGZCV",
  48. "parent_id": "01JRMX8AY2VK8MJ07Y6GEP92NM",
  49. "user_id": null
  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. 1
  62. ]
  63. },
  64. "target": {}
  65. },
  66. "running_script": false
  67. }
  68. }
  69. ]
  70. },
  71. "config": {
  72. "alias": "Set Smartfox Aout Mode",
  73. "description": "Set the Aout mode of Smartfox",
  74. "variables": {
  75. "aout_mode_off": [],
  76. "aout_mode_manual": [
  77. 1
  78. ],
  79. "aout_mode_auto": [
  80. 2
  81. ]
  82. },
  83. "fields": {
  84. "mode_in": {
  85. "selector": {
  86. "select": {
  87. "options": [
  88. "Off",
  89. "Manual",
  90. "Auto"
  91. ],
  92. "multiple": false
  93. }
  94. },
  95. "required": true,
  96. "description": "The Mode to set the Aout to",
  97. "name": "mode_in"
  98. }
  99. },
  100. "sequence": [
  101. {
  102. "service": "modbus.write_register",
  103. "data": {
  104. "hub": "SmartfoxPro2",
  105. "slave": 1,
  106. "address": 42206,
  107. "value": "{% if mode_in == \"Off\" %}\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"
  108. }
  109. }
  110. ],
  111. "mode": "single",
  112. "icon": "mdi:car-cruise-control"
  113. },
  114. "blueprint_inputs": null,
  115. "context": {
  116. "id": "01JRMXA5H3T5EH1J628NJVGZCV",
  117. "parent_id": "01JRMX8AY2VK8MJ07Y6GEP92NM",
  118. "user_id": null
  119. }
  120. },
  121. "logbookEntries": [
  122. {
  123. "when": 1744458552.871867,
  124. "state": "on",
  125. "entity_id": "script.set_smartfox_aout_mode",
  126. "icon": "mdi:car-cruise-control"
  127. },
  128. {
  129. "when": 1744458552.887684,
  130. "state": "off",
  131. "entity_id": "script.set_smartfox_aout_mode",
  132. "icon": "mdi:car-cruise-control",
  133. "context_state": "on",
  134. "context_entity_id": "script.set_smartfox_aout_mode"
  135. }
  136. ]
  137. }

Edit this Snippet