<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Start a script from another script in Home Automation</title>
    <link>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/473530#M21404</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm looking for a way to call an script from another script, I've created script to manage some stuff and now I want to call all those scripts in a single script.&lt;/P&gt;</description>
    <pubDate>Sat, 26 Aug 2023 02:07:50 GMT</pubDate>
    <dc:creator>pettymn</dc:creator>
    <dc:date>2023-08-26T02:07:50Z</dc:date>
    <item>
      <title>Start a script from another script</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/473530#M21404</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm looking for a way to call an script from another script, I've created script to manage some stuff and now I want to call all those scripts in a single script.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2023 02:07:50 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/473530#M21404</guid>
      <dc:creator>pettymn</dc:creator>
      <dc:date>2023-08-26T02:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Start a script from another script</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/473585#M21411</link>
      <description>&lt;P&gt;My approach is just a workaround in the current Google Home implementation.&lt;/P&gt;&lt;H2&gt;Callee&lt;/H2&gt;&lt;P&gt;Add a starter with the type "assistant.event.OkGoogle" and set the property "is" to a function name. It's better that the function name is not a valid English sentence. For example, I prefer "turn_off_the_tv" instead of "Turn off the TV".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata:
  name: Turn off the Air
  description: Simply turn off the Air via scene in third party app

automations:
  starters:
    - type: assistant.event.OkGoogle
      eventData: query
      is: turn_off_the_air

  actions:
    - type: device.command.ActivateScene
      activate: true
      devices: Power off Air&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;Caller&lt;/H2&gt;&lt;P&gt;Now in the script you wanna call the above script, you can trigger the script by specifying the function name with "assistant.command.OkGoogle".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  actions:
    - type: assistant.command.OkGoogle
      okGoogle: turn_off_the_air
      devices: Nest - Living Room&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2023 05:19:08 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/473585#M21411</guid>
      <dc:creator>EricTsengTy</dc:creator>
      <dc:date>2023-08-26T05:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Start a script from another script</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/566512#M39688</link>
      <description>&lt;P&gt;Thanks for your suggestion. But it's not working well unfortunately. Seems like Google home mini can understand the "turn_off_the_air" query and I get a response like "Sorry, it looks like that thermostat hasn't been set up yet. You can do that in Assistant Settings.".&lt;BR /&gt;&lt;BR /&gt;I'm trying to create some continuous reminder like following and would appreciate your help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata:
  name: Test
  description: Test

automations:
  - name: Ventilate office reminder
    starters:
      - type: time.schedule
        at: 8:00
      - type: assistant.event.OkGoogle
        eventData: query
        is: ventilate_office_reminder
    actions:
      - type: assistant.command.Broadcast
        devices:
          - Office speaker - Office
        message: Remember to ventilate the office
      - type: time.delay
        for: 10min
      - type: assistant.command.OkGoogle
        devices:
          - Office speaker - Office
        okGoogle: ventilate_office_reminder
  - name: Stop reminder
    starters:
      - type: device.state.OpenClose
        device: Office Window - Office
        state: openPercent
        is: 100
    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Office speaker - Office
        okGoogle: Stop "Ventilate office reminder"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Dec 2023 07:53:21 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/566512#M39688</guid>
      <dc:creator>home-assistant</dc:creator>
      <dc:date>2023-12-21T07:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Start a script from another script</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/566651#M39749</link>
      <description>&lt;P&gt;Multiple automations in a single script might not work normally currently, so maybe you can try to split it into two scripts (I know it's not elegant to do so ...).&lt;/P&gt;&lt;P&gt;You can check&amp;nbsp;&lt;A href="https://www.googlenestcommunity.com/t5/Home-Automation/Multiple-automations-in-single-script-sometimes-breaks-when-using-assistant/td-p/435715" target="_self"&gt;this link&lt;/A&gt;&amp;nbsp;for more details.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 14:02:21 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Start-a-script-from-another-script/m-p/566651#M39749</guid>
      <dc:creator>EricTsengTy</dc:creator>
      <dc:date>2023-12-21T14:02:21Z</dc:date>
    </item>
  </channel>
</rss>

