Guest User

google

a guest
Dec 2nd, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 35.09 KB | None | 0 0
  1. {
  2.   "trace": {
  3.     "last_step": "sequence/23/repeat/sequence/0",
  4.     "run_id": "a401ff9a68500ea6a119667590ed4294",
  5.     "state": "stopped",
  6.     "script_execution": "finished",
  7.     "timestamp": {
  8.       "start": "2022-12-02T14:51:53.204552+00:00",
  9.       "finish": "2022-12-02T14:52:06.670890+00:00"
  10.     },
  11.     "domain": "script",
  12.     "item_id": "google_home_resume",
  13.     "trace": {
  14.       "sequence/0": [
  15.         {
  16.           "path": "sequence/0",
  17.           "timestamp": "2022-12-02T14:51:53.206068+00:00",
  18.           "changed_variables": {
  19.             "settings": {
  20.               "players_screen": null,
  21.               "primary_spotcast": "robert_soldano",
  22.               "default_volume_level": 0.5,
  23.               "dummy_player": "media_player.vlc_telnet",
  24.               "default_resume_delay": {
  25.                 "seconds": 20
  26.               },
  27.               "enable_automation": true,
  28.               "dashboard_cast": true,
  29.               "announce_volume_automation": 0.8
  30.             },
  31.             "this": {
  32.               "entity_id": "script.google_home_resume",
  33.               "state": "off",
  34.               "attributes": {
  35.                 "last_triggered": "2022-12-02T14:23:29.324767+00:00",
  36.                 "mode": "parallel",
  37.                 "current": 0,
  38.                 "max": 10,
  39.                 "icon": "mdi:cast-audio",
  40.                 "friendly_name": "00 - Google Home Resume",
  41.                 "settings": {
  42.                   "players_screen": null,
  43.                   "primary_spotcast": "robert_soldano",
  44.                   "default_volume_level": 0.5,
  45.                   "dummy_player": "media_player.vlc_telnet",
  46.                   "default_resume_delay": {
  47.                     "seconds": 20
  48.                   },
  49.                   "enable_automation": true,
  50.                   "dashboard_cast": true,
  51.                   "announce_volume_automation": 0.8
  52.                 },
  53.                 "voice_settings": {
  54.                   "check_for_title": "Witte ruis",
  55.                   "use_resume": true
  56.                 }
  57.               },
  58.               "last_changed": "2022-12-02T14:24:04.115141+00:00",
  59.               "last_updated": "2022-12-02T14:24:04.115141+00:00",
  60.               "context": {
  61.                 "id": "01GK9KJ50K107EE9AAWJR03P75",
  62.                 "parent_id": null,
  63.                 "user_id": null
  64.               }
  65.             },
  66.             "action": {
  67.               "service": "tts.google_translate_say",
  68.               "target": {
  69.                 "entity_id": "media_player.ufficio_milena"
  70.               },
  71.               "data": {
  72.                 "message": "Milen ce, una pecorina al giorno, toglie il medico di torno!!!",
  73.                 "language": "it"
  74.               },
  75.               "extra": {
  76.                 "volume": 0.8
  77.               }
  78.             },
  79.             "context": {
  80.               "id": "01GK9N52ZMGH5YHEY1S5N2134Y",
  81.               "parent_id": null,
  82.               "user_id": "2a298aebc80446749be35680bdc494b1"
  83.             }
  84.           }
  85.         }
  86.       ],
  87.       "sequence/1": [
  88.         {
  89.           "path": "sequence/1",
  90.           "timestamp": "2022-12-02T14:51:53.206118+00:00",
  91.           "changed_variables": {
  92.             "version": "2022.12.0"
  93.           }
  94.         }
  95.       ],
  96.       "sequence/1/if": [
  97.         {
  98.           "path": "sequence/1/if",
  99.           "timestamp": "2022-12-02T14:51:53.206150+00:00",
  100.           "result": {
  101.             "result": false
  102.           }
  103.         }
  104.       ],
  105.       "sequence/1/if/condition/0": [
  106.         {
  107.           "path": "sequence/1/if/condition/0",
  108.           "timestamp": "2022-12-02T14:51:53.206163+00:00",
  109.           "result": {
  110.             "result": false,
  111.             "entities": [
  112.               "script.google_home_resume"
  113.             ]
  114.           }
  115.         }
  116.       ],
  117.       "sequence/2": [
  118.         {
  119.           "path": "sequence/2",
  120.           "timestamp": "2022-12-02T14:51:53.206327+00:00"
  121.         }
  122.       ],
  123.       "sequence/3": [
  124.         {
  125.           "path": "sequence/3",
  126.           "timestamp": "2022-12-02T14:51:53.206412+00:00",
  127.           "changed_variables": {
  128.             "event_script": false,
  129.             "automation": false
  130.           }
  131.         }
  132.       ],
  133.       "sequence/4": [
  134.         {
  135.           "path": "sequence/4",
  136.           "timestamp": "2022-12-02T14:51:53.206600+00:00",
  137.           "changed_variables": {
  138.             "service_calls": [
  139.               {
  140.                 "service": "tts.google_translate_say",
  141.                 "target": {
  142.                   "entity_id": "media_player.ufficio_milena"
  143.                 },
  144.                 "data": {
  145.                   "message": "Milen ce, una pecorina al giorno, toglie il medico di torno!!!",
  146.                   "language": "it"
  147.                 },
  148.                 "extra": {
  149.                   "volume": 0.8
  150.                 }
  151.               }
  152.             ],
  153.             "no_service_count": 0
  154.           }
  155.         }
  156.       ],
  157.       "sequence/4/choose/0": [
  158.         {
  159.           "path": "sequence/4/choose/0",
  160.           "timestamp": "2022-12-02T14:51:53.206630+00:00",
  161.           "result": {
  162.             "result": false
  163.           }
  164.         }
  165.       ],
  166.       "sequence/4/choose/0/conditions/0": [
  167.         {
  168.           "path": "sequence/4/choose/0/conditions/0",
  169.           "timestamp": "2022-12-02T14:51:53.206642+00:00",
  170.           "result": {
  171.             "result": false,
  172.             "entities": []
  173.           }
  174.         }
  175.       ],
  176.       "sequence/4/choose/1": [
  177.         {
  178.           "path": "sequence/4/choose/1",
  179.           "timestamp": "2022-12-02T14:51:53.206692+00:00",
  180.           "result": {
  181.             "result": false
  182.           }
  183.         }
  184.       ],
  185.       "sequence/4/choose/1/conditions/0": [
  186.         {
  187.           "path": "sequence/4/choose/1/conditions/0",
  188.           "timestamp": "2022-12-02T14:51:53.206703+00:00",
  189.           "result": {
  190.             "result": false,
  191.             "entities": []
  192.           }
  193.         }
  194.       ],
  195.       "sequence/5": [
  196.         {
  197.           "path": "sequence/5",
  198.           "timestamp": "2022-12-02T14:51:53.206750+00:00"
  199.         }
  200.       ],
  201.       "sequence/6": [
  202.         {
  203.           "path": "sequence/6",
  204.           "timestamp": "2022-12-02T14:51:53.207382+00:00",
  205.           "changed_variables": {
  206.             "start_time": "2022-12-02 16:51:53.206822+02:00",
  207.             "speaker_groups": {},
  208.             "speaker_group_list": [],
  209.             "cast_entities": [
  210.               "media_player.ufficio_milena"
  211.             ],
  212.             "spotify_entities": [
  213.               "media_player.spotify_robert_soldano",
  214.               "media_player.spotify_milena_dacheva"
  215.             ],
  216.             "mass_entities": [],
  217.             "cast_mass_playing": [],
  218.             "mass_playing": [],
  219.             "primary_spotcast_check": true,
  220.             "ytube_music_entities": [],
  221.             "resume_active": [],
  222.             "resume_action_false": []
  223.           },
  224.           "result": {
  225.             "choice": "then"
  226.           }
  227.         }
  228.       ],
  229.       "sequence/6/if": [
  230.         {
  231.           "path": "sequence/6/if",
  232.           "timestamp": "2022-12-02T14:51:53.207417+00:00",
  233.           "result": {
  234.             "result": true
  235.           }
  236.         }
  237.       ],
  238.       "sequence/6/if/condition/0": [
  239.         {
  240.           "path": "sequence/6/if/condition/0",
  241.           "timestamp": "2022-12-02T14:51:53.207431+00:00",
  242.           "result": {
  243.             "result": true,
  244.             "entities": []
  245.           }
  246.         }
  247.       ],
  248.       "sequence/6/then/0": [
  249.         {
  250.           "path": "sequence/6/then/0",
  251.           "timestamp": "2022-12-02T14:51:53.207687+00:00",
  252.           "result": {
  253.             "params": {
  254.               "domain": "homeassistant",
  255.               "service": "update_entity",
  256.               "service_data": {},
  257.               "target": {
  258.                 "entity_id": [
  259.                   "media_player.spotify_robert_soldano",
  260.                   "media_player.spotify_milena_dacheva"
  261.                 ]
  262.               }
  263.             },
  264.             "running_script": false,
  265.             "limit": 10
  266.           }
  267.         }
  268.       ],
  269.       "sequence/7": [
  270.         {
  271.           "path": "sequence/7",
  272.           "timestamp": "2022-12-02T14:51:53.351160+00:00"
  273.         }
  274.       ],
  275.       "sequence/8": [
  276.         {
  277.           "path": "sequence/8",
  278.           "timestamp": "2022-12-02T14:51:53.351219+00:00",
  279.           "changed_variables": {
  280.             "data_source": "resume_script"
  281.           }
  282.         }
  283.       ],
  284.       "sequence/9": [
  285.         {
  286.           "path": "sequence/9",
  287.           "timestamp": "2022-12-02T14:51:53.351831+00:00",
  288.           "changed_variables": {
  289.             "player_data": [
  290.               {
  291.                 "data_source": "resume_script",
  292.                 "entity_id": "media_player.ufficio_milena",
  293.                 "state": "playing",
  294.                 "type": "speaker",
  295.                 "members": [],
  296.                 "volume_level": 0.3,
  297.                 "app_name": "Spotify",
  298.                 "media_content_id": "spotify:track:27NovPIUIRrOZoCHxABJwK",
  299.                 "media_position": 92.12,
  300.                 "spotcast": "milena_dacheva"
  301.               }
  302.             ]
  303.           }
  304.         }
  305.       ],
  306.       "sequence/10": [
  307.         {
  308.           "path": "sequence/10",
  309.           "timestamp": "2022-12-02T14:51:53.352286+00:00",
  310.           "changed_variables": {
  311.             "target_list": [
  312.               "media_player.ufficio_milena"
  313.             ]
  314.           }
  315.         }
  316.       ],
  317.       "sequence/11": [
  318.         {
  319.           "path": "sequence/11",
  320.           "timestamp": "2022-12-02T14:51:53.352445+00:00",
  321.           "changed_variables": {
  322.             "players_to_resume": [
  323.               "media_player.ufficio_milena"
  324.             ]
  325.           }
  326.         }
  327.       ],
  328.       "sequence/11/if": [
  329.         {
  330.           "path": "sequence/11/if",
  331.           "timestamp": "2022-12-02T14:51:53.352478+00:00",
  332.           "result": {
  333.             "result": false
  334.           }
  335.         }
  336.       ],
  337.       "sequence/11/if/condition/0": [
  338.         {
  339.           "path": "sequence/11/if/condition/0",
  340.           "timestamp": "2022-12-02T14:51:53.352493+00:00",
  341.           "result": {
  342.             "result": false,
  343.             "entities": []
  344.           }
  345.         }
  346.       ],
  347.       "sequence/12": [
  348.         {
  349.           "path": "sequence/12",
  350.           "timestamp": "2022-12-02T14:51:53.352558+00:00"
  351.         }
  352.       ],
  353.       "sequence/13": [
  354.         {
  355.           "path": "sequence/13",
  356.           "timestamp": "2022-12-02T14:51:53.352690+00:00",
  357.           "changed_variables": {
  358.             "target_not_playing": [],
  359.             "target_no_volume": []
  360.           },
  361.           "result": {
  362.             "params": {
  363.               "domain": "group",
  364.               "service": "set",
  365.               "service_data": {
  366.                 "object_id": "resume_script_active_ghresume_01gk9n52zmgh5yhey1s5n2134y",
  367.                 "name": "Entities currently active with Google Home Resume script",
  368.                 "icon": "mdi:play-box",
  369.                 "entities": [
  370.                   "media_player.ufficio_milena"
  371.                 ]
  372.               },
  373.               "target": {}
  374.             },
  375.             "running_script": false,
  376.             "limit": 10
  377.           }
  378.         }
  379.       ],
  380.       "sequence/14": [
  381.         {
  382.           "path": "sequence/14",
  383.           "timestamp": "2022-12-02T14:51:53.354657+00:00",
  384.           "result": {
  385.             "choice": "then"
  386.           }
  387.         }
  388.       ],
  389.       "sequence/14/if": [
  390.         {
  391.           "path": "sequence/14/if",
  392.           "timestamp": "2022-12-02T14:51:53.354700+00:00",
  393.           "result": {
  394.             "result": true
  395.           }
  396.         }
  397.       ],
  398.       "sequence/14/if/condition/0": [
  399.         {
  400.           "path": "sequence/14/if/condition/0",
  401.           "timestamp": "2022-12-02T14:51:53.354716+00:00",
  402.           "result": {
  403.             "result": true,
  404.             "entities": []
  405.           }
  406.         }
  407.       ],
  408.       "sequence/14/then/0": [
  409.         {
  410.           "path": "sequence/14/then/0",
  411.           "timestamp": "2022-12-02T14:51:53.355007+00:00",
  412.           "result": {
  413.             "params": {
  414.               "domain": "group",
  415.               "service": "set",
  416.               "service_data": {
  417.                 "object_id": "resume_action_false_ghresume_01gk9n52zmgh5yhey1s5n2134y",
  418.                 "name": "Entities with actions which should not be resumed",
  419.                 "icon": "mdi:alert-octagon",
  420.                 "entities": [
  421.                   "media_player.ufficio_milena"
  422.                 ]
  423.               },
  424.               "target": {}
  425.             },
  426.             "running_script": false,
  427.             "limit": 10
  428.           }
  429.         }
  430.       ],
  431.       "sequence/15": [
  432.         {
  433.           "path": "sequence/15",
  434.           "timestamp": "2022-12-02T14:51:53.356899+00:00"
  435.         }
  436.       ],
  437.       "sequence/15/if": [
  438.         {
  439.           "path": "sequence/15/if",
  440.           "timestamp": "2022-12-02T14:51:53.356942+00:00",
  441.           "result": {
  442.             "result": false
  443.           }
  444.         }
  445.       ],
  446.       "sequence/15/if/condition/0": [
  447.         {
  448.           "path": "sequence/15/if/condition/0",
  449.           "timestamp": "2022-12-02T14:51:53.356959+00:00",
  450.           "result": {
  451.             "result": false,
  452.             "entities": []
  453.           }
  454.         }
  455.       ],
  456.       "sequence/16": [
  457.         {
  458.           "path": "sequence/16",
  459.           "timestamp": "2022-12-02T14:51:53.357041+00:00"
  460.         }
  461.       ],
  462.       "sequence/17": [
  463.         {
  464.           "path": "sequence/17",
  465.           "timestamp": "2022-12-02T14:51:53.357116+00:00"
  466.         }
  467.       ],
  468.       "sequence/17/if": [
  469.         {
  470.           "path": "sequence/17/if",
  471.           "timestamp": "2022-12-02T14:51:53.357140+00:00",
  472.           "result": {
  473.             "result": false
  474.           }
  475.         }
  476.       ],
  477.       "sequence/17/if/condition/0": [
  478.         {
  479.           "path": "sequence/17/if/condition/0",
  480.           "timestamp": "2022-12-02T14:51:53.357153+00:00",
  481.           "result": {
  482.             "result": false,
  483.             "entities": []
  484.           }
  485.         }
  486.       ],
  487.       "sequence/18": [
  488.         {
  489.           "path": "sequence/18",
  490.           "timestamp": "2022-12-02T14:51:53.357257+00:00"
  491.         }
  492.       ],
  493.       "sequence/19": [
  494.         {
  495.           "path": "sequence/19",
  496.           "timestamp": "2022-12-02T14:51:53.357321+00:00"
  497.         }
  498.       ],
  499.       "sequence/19/repeat/sequence/0": [
  500.         {
  501.           "path": "sequence/19/repeat/sequence/0",
  502.           "timestamp": "2022-12-02T14:51:53.357504+00:00",
  503.           "changed_variables": {
  504.             "repeat": {
  505.               "first": true,
  506.               "index": 1,
  507.               "last": true,
  508.               "item": {
  509.                 "service": "tts.google_translate_say",
  510.                 "target": {
  511.                   "entity_id": "media_player.ufficio_milena"
  512.                 },
  513.                 "data": {
  514.                   "message": "Milen ce, una pecorina al giorno, toglie il medico di torno!!!",
  515.                   "language": "it"
  516.                 },
  517.                 "extra": {
  518.                   "volume": 0.8
  519.                 }
  520.               }
  521.             }
  522.           }
  523.         }
  524.       ],
  525.       "sequence/19/repeat/sequence/1": [
  526.         {
  527.           "path": "sequence/19/repeat/sequence/1",
  528.           "timestamp": "2022-12-02T14:51:53.358245+00:00",
  529.           "changed_variables": {
  530.             "service_call": {
  531.               "service": "tts.google_translate_say",
  532.               "target": {
  533.                 "entity_id": "media_player.ufficio_milena"
  534.               },
  535.               "data": {
  536.                 "message": "Milen ce, una pecorina al giorno, toglie il medico di torno!!!",
  537.                 "language": "it"
  538.               },
  539.               "extra": {
  540.                 "volume": 0.8
  541.               }
  542.             },
  543.             "target": {
  544.               "entity_id": "media_player.ufficio_milena"
  545.             },
  546.             "extra": {
  547.               "volume": 0.8
  548.             },
  549.             "volume_set": true,
  550.             "wait_set": false,
  551.             "tts": true,
  552.             "target_entities": [
  553.               "media_player.ufficio_milena"
  554.             ],
  555.             "media_entities": [
  556.               "media_player.ufficio_milena"
  557.             ],
  558.             "cast_target": [
  559.               "media_player.ufficio_milena"
  560.             ],
  561.             "screen": false,
  562.             "data": {
  563.               "message": "Milen ce, una pecorina al giorno, toglie il medico di torno!!!",
  564.               "language": "it"
  565.             }
  566.           },
  567.           "result": {
  568.             "params": {
  569.               "domain": "media_player",
  570.               "service": "media_stop",
  571.               "service_data": {},
  572.               "target": {
  573.                 "entity_id": [
  574.                   "media_player.ufficio_milena"
  575.                 ]
  576.               }
  577.             },
  578.             "running_script": false,
  579.             "limit": 10
  580.           }
  581.         }
  582.       ],
  583.       "sequence/19/repeat/sequence/2": [
  584.         {
  585.           "path": "sequence/19/repeat/sequence/2",
  586.           "timestamp": "2022-12-02T14:51:53.359367+00:00",
  587.           "result": {
  588.             "wait": {
  589.               "remaining": null,
  590.               "completed": true
  591.             }
  592.           }
  593.         }
  594.       ],
  595.       "sequence/19/repeat/sequence/3": [
  596.         {
  597.           "path": "sequence/19/repeat/sequence/3",
  598.           "timestamp": "2022-12-02T14:51:53.529104+00:00",
  599.           "changed_variables": {
  600.             "wait": {
  601.               "remaining": null,
  602.               "completed": true
  603.             }
  604.           },
  605.           "result": {
  606.             "choice": 0
  607.           }
  608.         }
  609.       ],
  610.       "sequence/19/repeat/sequence/3/choose/0": [
  611.         {
  612.           "path": "sequence/19/repeat/sequence/3/choose/0",
  613.           "timestamp": "2022-12-02T14:51:53.529153+00:00",
  614.           "result": {
  615.             "result": true
  616.           }
  617.         }
  618.       ],
  619.       "sequence/19/repeat/sequence/3/choose/0/conditions/0": [
  620.         {
  621.           "path": "sequence/19/repeat/sequence/3/choose/0/conditions/0",
  622.           "timestamp": "2022-12-02T14:51:53.529169+00:00",
  623.           "result": {
  624.             "result": true,
  625.             "entities": []
  626.           }
  627.         }
  628.       ],
  629.       "sequence/19/repeat/sequence/3/choose/0/sequence/0": [
  630.         {
  631.           "path": "sequence/19/repeat/sequence/3/choose/0/sequence/0",
  632.           "timestamp": "2022-12-02T14:51:53.530152+00:00",
  633.           "result": {
  634.             "params": {
  635.               "domain": "media_player",
  636.               "service": "volume_set",
  637.               "service_data": {
  638.                 "volume_level": 0.8,
  639.                 "entity_id": [
  640.                   "media_player.ufficio_milena"
  641.                 ]
  642.               },
  643.               "target": {
  644.                 "entity_id": [
  645.                   "media_player.ufficio_milena"
  646.                 ]
  647.               }
  648.             },
  649.             "running_script": false,
  650.             "limit": 10
  651.           }
  652.         }
  653.       ],
  654.       "sequence/19/repeat/sequence/4": [
  655.         {
  656.           "path": "sequence/19/repeat/sequence/4",
  657.           "timestamp": "2022-12-02T14:51:53.531455+00:00"
  658.         }
  659.       ],
  660.       "sequence/19/repeat/sequence/4/choose/0": [
  661.         {
  662.           "path": "sequence/19/repeat/sequence/4/choose/0",
  663.           "timestamp": "2022-12-02T14:51:53.531497+00:00",
  664.           "result": {
  665.             "result": false
  666.           }
  667.         }
  668.       ],
  669.       "sequence/19/repeat/sequence/4/choose/0/conditions/0": [
  670.         {
  671.           "path": "sequence/19/repeat/sequence/4/choose/0/conditions/0",
  672.           "timestamp": "2022-12-02T14:51:53.531513+00:00",
  673.           "result": {
  674.             "result": false,
  675.             "entities": []
  676.           }
  677.         }
  678.       ],
  679.       "sequence/19/repeat/sequence/5": [
  680.         {
  681.           "path": "sequence/19/repeat/sequence/5",
  682.           "timestamp": "2022-12-02T14:51:53.531587+00:00",
  683.           "child_id": {
  684.             "domain": "automation",
  685.             "item_id": "417395bc-bd64-40a3-b20a-9062d426a01f",
  686.             "run_id": "6d25121f6fa0aa902542f7ec97ffad81"
  687.           },
  688.           "result": {
  689.             "params": {
  690.               "domain": "tts",
  691.               "service": "google_translate_say",
  692.               "service_data": {
  693.                 "message": "Milen ce, una pecorina al giorno, toglie il medico di torno!!!",
  694.                 "language": "it",
  695.                 "entity_id": [
  696.                   "media_player.ufficio_milena"
  697.                 ]
  698.               },
  699.               "target": {
  700.                 "entity_id": [
  701.                   "media_player.ufficio_milena"
  702.                 ]
  703.               }
  704.             },
  705.             "running_script": false,
  706.             "limit": 10
  707.           }
  708.         }
  709.       ],
  710.       "sequence/19/repeat/sequence/6": [
  711.         {
  712.           "path": "sequence/19/repeat/sequence/6",
  713.           "timestamp": "2022-12-02T14:51:56.095991+00:00"
  714.         }
  715.       ],
  716.       "sequence/19/repeat/sequence/6/if": [
  717.         {
  718.           "path": "sequence/19/repeat/sequence/6/if",
  719.           "timestamp": "2022-12-02T14:51:56.096043+00:00",
  720.           "result": {
  721.             "result": false
  722.           }
  723.         }
  724.       ],
  725.       "sequence/19/repeat/sequence/6/if/condition/0": [
  726.         {
  727.           "path": "sequence/19/repeat/sequence/6/if/condition/0",
  728.           "timestamp": "2022-12-02T14:51:56.096060+00:00",
  729.           "result": {
  730.             "result": false,
  731.             "entities": []
  732.           }
  733.         }
  734.       ],
  735.       "sequence/20": [
  736.         {
  737.           "path": "sequence/20",
  738.           "timestamp": "2022-12-02T14:51:56.096214+00:00"
  739.         }
  740.       ],
  741.       "sequence/20/repeat/sequence/0": [
  742.         {
  743.           "path": "sequence/20/repeat/sequence/0",
  744.           "timestamp": "2022-12-02T14:51:56.096438+00:00",
  745.           "changed_variables": {
  746.             "repeat": {
  747.               "first": true,
  748.               "index": 1,
  749.               "last": true,
  750.               "item": "media_player.ufficio_milena"
  751.             }
  752.           }
  753.         }
  754.       ],
  755.       "sequence/20/repeat/sequence/1": [
  756.         {
  757.           "path": "sequence/20/repeat/sequence/1",
  758.           "timestamp": "2022-12-02T14:51:56.096593+00:00",
  759.           "child_id": {
  760.             "domain": "script",
  761.             "item_id": "google_home_resume_helper",
  762.             "run_id": "cfa551123b220d86782bafd9f515537b"
  763.           },
  764.           "changed_variables": {
  765.             "player": {
  766.               "data_source": "resume_script",
  767.               "entity_id": "media_player.ufficio_milena",
  768.               "state": "playing",
  769.               "type": "speaker",
  770.               "members": [],
  771.               "volume_level": 0.3,
  772.               "app_name": "Spotify",
  773.               "media_content_id": "spotify:track:27NovPIUIRrOZoCHxABJwK",
  774.               "media_position": 92.12,
  775.               "spotcast": "milena_dacheva"
  776.             }
  777.           },
  778.           "result": {
  779.             "params": {
  780.               "domain": "script",
  781.               "service": "turn_on",
  782.               "service_data": {
  783.                 "variables": {
  784.                   "start_time": "2022-12-02 16:51:53.206822+02:00",
  785.                   "player": {
  786.                     "data_source": "resume_script",
  787.                     "entity_id": "media_player.ufficio_milena",
  788.                     "state": "playing",
  789.                     "type": "speaker",
  790.                     "members": [],
  791.                     "volume_level": 0.3,
  792.                     "app_name": "Spotify",
  793.                     "media_content_id": "spotify:track:27NovPIUIRrOZoCHxABJwK",
  794.                     "media_position": 92.12,
  795.                     "spotcast": "milena_dacheva"
  796.                   },
  797.                   "member_data": [],
  798.                   "players_to_resume": [
  799.                     "media_player.ufficio_milena"
  800.                   ],
  801.                   "event_script": false,
  802.                   "resume": true,
  803.                   "ytube_resume": false,
  804.                   "action_type": "resume",
  805.                   "resume_delay": {
  806.                     "seconds": 20
  807.                   }
  808.                 },
  809.                 "entity_id": [
  810.                   "script.google_home_resume_helper"
  811.                 ]
  812.               },
  813.               "target": {
  814.                 "entity_id": [
  815.                   "script.google_home_resume_helper"
  816.                 ]
  817.               }
  818.             },
  819.             "running_script": true,
  820.             "limit": null
  821.           }
  822.         }
  823.       ],
  824.       "sequence/21": [
  825.         {
  826.           "path": "sequence/21",
  827.           "timestamp": "2022-12-02T14:51:56.101433+00:00"
  828.         }
  829.       ],
  830.       "sequence/22": [
  831.         {
  832.           "path": "sequence/22",
  833.           "timestamp": "2022-12-02T14:51:56.101830+00:00",
  834.           "changed_variables": {
  835.             "groups_to_remove": [
  836.               "group.resume_script_active_ghresume_01gk9n52zmgh5yhey1s5n2134y",
  837.               "group.resume_action_false_ghresume_01gk9n52zmgh5yhey1s5n2134y",
  838.               "group.resume_active_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  839.             ]
  840.           },
  841.           "result": {
  842.             "wait": {
  843.               "remaining": null,
  844.               "completed": true
  845.             }
  846.           }
  847.         }
  848.       ],
  849.       "sequence/23": [
  850.         {
  851.           "path": "sequence/23",
  852.           "timestamp": "2022-12-02T14:52:06.664766+00:00",
  853.           "changed_variables": {
  854.             "wait": {
  855.               "remaining": null,
  856.               "completed": true
  857.             }
  858.           }
  859.         }
  860.       ],
  861.       "sequence/23/repeat/sequence/0": [
  862.         {
  863.           "path": "sequence/23/repeat/sequence/0",
  864.           "timestamp": "2022-12-02T14:52:06.666061+00:00",
  865.           "changed_variables": {
  866.             "repeat": {
  867.               "first": true,
  868.               "index": 1,
  869.               "last": false,
  870.               "item": "group.resume_script_active_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  871.             }
  872.           },
  873.           "result": {
  874.             "params": {
  875.               "domain": "group",
  876.               "service": "remove",
  877.               "service_data": {
  878.                 "object_id": "resume_script_active_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  879.               },
  880.               "target": {}
  881.             },
  882.             "running_script": false,
  883.             "limit": 10
  884.           }
  885.         },
  886.         {
  887.           "path": "sequence/23/repeat/sequence/0",
  888.           "timestamp": "2022-12-02T14:52:06.666985+00:00",
  889.           "changed_variables": {
  890.             "repeat": {
  891.               "first": false,
  892.               "index": 2,
  893.               "last": false,
  894.               "item": "group.resume_action_false_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  895.             }
  896.           },
  897.           "result": {
  898.             "params": {
  899.               "domain": "group",
  900.               "service": "remove",
  901.               "service_data": {
  902.                 "object_id": "resume_action_false_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  903.               },
  904.               "target": {}
  905.             },
  906.             "running_script": false,
  907.             "limit": 10
  908.           }
  909.         },
  910.         {
  911.           "path": "sequence/23/repeat/sequence/0",
  912.           "timestamp": "2022-12-02T14:52:06.667734+00:00",
  913.           "changed_variables": {
  914.             "repeat": {
  915.               "first": false,
  916.               "index": 3,
  917.               "last": true,
  918.               "item": "group.resume_active_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  919.             }
  920.           },
  921.           "result": {
  922.             "params": {
  923.               "domain": "group",
  924.               "service": "remove",
  925.               "service_data": {
  926.                 "object_id": "resume_active_ghresume_01gk9n52zmgh5yhey1s5n2134y"
  927.               },
  928.               "target": {}
  929.             },
  930.             "running_script": false,
  931.             "limit": 10
  932.           }
  933.         }
  934.       ]
  935.     },
  936.     "config": {
  937.       "alias": "00 - Google Home Resume",
  938.       "description": "Script for resuming Google Home speakers",
  939.       "icon": "mdi:cast-audio",
  940.       "mode": "parallel",
  941.       "fields": {
  942.         "target": {
  943.           "description": "Enter the targets in case they are not clear from the service calls",
  944.           "required": false,
  945.           "selector": {
  946.             "target": {
  947.               "entity": {
  948.                 "integration": "cast",
  949.                 "domain": "media_player"
  950.               },
  951.               "device": {
  952.                 "integration": "cast"
  953.               }
  954.             }
  955.           }
  956.         },
  957.         "action": {
  958.           "description": "Actions to be performed (only service calls will work)",
  959.           "required": true,
  960.           "selector": {
  961.             "action": null
  962.           }
  963.         },
  964.         "resume_this_action": {
  965.           "description": "Set to false if you don't want to resume the actions started with this script (default is true)",
  966.           "required": false,
  967.           "selector": {
  968.             "boolean": null
  969.           }
  970.         },
  971.         "resume_delay": {
  972.           "description": "Delay before resume when casting an image or dashboard. Default value is set by default_resume_delay variable or 20 seconds.",
  973.           "required": false,
  974.           "selector": {
  975.             "duration": null
  976.           }
  977.         }
  978.       },
  979.       "variables": {
  980.         "settings": {
  981.           "players_screen": null,
  982.           "primary_spotcast": "robert_soldano",
  983.           "default_volume_level": 0.5,
  984.           "dummy_player": "media_player.vlc_telnet",
  985.           "default_resume_delay": {
  986.             "seconds": 20
  987.           },
  988.           "enable_automation": true,
  989.           "dashboard_cast": true,
  990.           "announce_volume_automation": 0.8
  991.         }
  992.       },
  993.       "sequence": [
  994.         {
  995.           "alias": "Version number",
  996.           "variables": {
  997.             "version": "2022.12.0"
  998.           }
  999.         },
  1000.         {
  1001.           "alias": "Failsafe to remove all groups if the script was not running",
  1002.           "if": "{{ \n  state_attr(this.entity_id, 'current') == 1\n  and integration_entities('group')\n        | select('search', 'ghresume')\n        | list | count > 0\n}}\n",
  1003.           "then": [
  1004.             {
  1005.               "alias": "Which groups to remove",
  1006.               "variables": {
  1007.                 "groups_existing": "{{ integration_entities('group') | select('search', 'ghresume') | list }}\n"
  1008.               }
  1009.             },
  1010.             {
  1011.               "alias": "Loop to remove groups",
  1012.               "repeat": {
  1013.                 "for_each": "{{ groups_existing }}",
  1014.                 "sequence": [
  1015.                   {
  1016.                     "alias": "Remove one group",
  1017.                     "service": "group.remove",
  1018.                     "data": {
  1019.                       "object_id": "{{ states[repeat.item].object_id }}"
  1020.                     }
  1021.                   }
  1022.                 ]
  1023.               }
  1024.             }
  1025.           ]
  1026.         },
  1027.         {
  1028.           "alias": "Set based on other scripts",
  1029.           "variables": {
  1030.             "event_script": "{{ event_script | default(false) }}",
  1031.             "automation": "{{ automation | default(false) }}"
  1032.           }
  1033.         },
  1034.         {
  1035.           "alias": "Set variables for service calls",
  1036.           "variables": {
  1037.             "service_calls": "{% set action = action | default([]) %} {{ iif(action is mapping,[ action ], action) | selectattr('service', 'defined') | list }}\n",
  1038.             "no_service_count": "{% set action = action | default([]) %} {{ iif(action is mapping,[ action ], action) | count - service_calls | count }}\n"
  1039.           }
  1040.         },
  1041.         {
  1042.           "alias": "Wrong actions provided",
  1043.           "choose": [
  1044.             {
  1045.               "conditions": "{{ not (event_script or automation) and service_calls | count == 0 }}",
  1046.               "sequence": [
  1047.                 {
  1048.                   "stop": "There were no service calls defined, no actions are performed. The script script has been aborted.",
  1049.                   "error": true
  1050.                 }
  1051.               ]
  1052.             },
  1053.             {
  1054.               "conditions": "{{ not (event_script or automation) and no_service_count > 0 }}",
  1055.               "sequence": [
  1056.                 {
  1057.                   "service": "system_log.write",
  1058.                   "data": {
  1059.                     "level": "warning",
  1060.                     "logger": "{{ this.entity_id }}",
  1061.                     "message": "{{ no_service_count }} out of {{ service_calls | count }} actions were not performed because they are not service calls.\n"
  1062.                   }
  1063.                 }
  1064.               ]
  1065.             }
  1066.           ]
  1067.         },
  1068.         {
  1069.           "alias": "Set variables to be used in the script",
  1070.           "variables": {
  1071.             "start_time": "{{ start_time if start_time is defined else now() }}",
  1072.             "speaker_groups": "{{ settings.get('speaker_groups') | default({}, true) }}",
  1073.             "speaker_group_list": "{{ speaker_groups.keys() | list }}",
  1074.             "cast_entities": "{{ integration_entities('cast') }}",
  1075.             "spotify_entities": "{{ integration_entities('spotify') }}",
  1076.             "mass_entities": "{{ integration_entities('mass') | select('match', '^media_player.') | list }}",
  1077.             "cast_mass_playing": "{%- if cast_mass_playing is defined %}\n  {{ cast_mass_playing }}\n{%- else %}\n  {{\n    expand(integration_entities('cast'))\n      | selectattr('attributes.media_title', 'defined')\n      | selectattr('attributes.media_title', 'search', 'Streaming from Music Assistant')\n      | map(attribute='entity_id')\n      | list\n  }}\n{%- endif %}\n",
  1078.             "mass_playing": "{{ cast_mass_playing | map('replace', '.', '.mass_') | select() | list }}",
  1079.             "primary_spotcast_check": "{%- set accounts = spotify_entities | map('replace', 'media_player.spotify_', '') | list %} {{ spotify_entities | count <= 1 or settings.get('primary_spotcast') in accounts }}\n",
  1080.             "ytube_music_entities": "{{ integration_entities('ytube_music_player') | select('match', '^media_player.') | list }}\n",
  1081.             "resume_active": "{{ expand(integration_entities('group'))\n    | selectattr('entity_id', 'search', 'group.resume_active_ghresume')\n    | map(attribute='attributes.entity_id')\n    | map('list')\n    | sum(start=[])\n}}\n",
  1082.             "resume_action_false": "{{ expand(integration_entities('group'))\n    | selectattr('entity_id', 'search', 'group.resume_action_false_ghresume')\n    | map(attribute='attributes.entity_id')\n    | map('list')\n    | sum(start=[])\n}}\n"
  1083.           }
  1084.         },
  1085.         {
  1086.           "alias": "Update Spotify data if there are Spotify entities",
  1087.           "if": "{{ spotify_entities | count > 0 }}",
  1088.           "then": [
  1089.             {
  1090.               "alias": "Update Spotify entities",
  1091.               "service": "homeassistant.update_entity",
  1092.               "target": {
  1093.                 "entity_id": "{{ spotify_entities }}"
  1094.               }
  1095.             }
  1096.           ]
  1097.         },
  1098.         {
  1099.           "alias": "Store data of media player entities and determine target_list",
  1100.           "variables": {
  1101.             "data_source": "resume_script"
  1102.           }
  1103.         },
  1104.         {
  1105.           "variables": {
  1106.             "player_data": "{%- if player_data is undefined %}\n  {
Add Comment
Please, Sign In to add comment