<?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 Script Editor: How does device.state.AppSelector work? in Home Automation</title>
    <link>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/452175#M19942</link>
    <description>&lt;P&gt;It looks like AppSelector can be used as a starter (which i find kind of fascinating...) but it doesn't seem to do anything. The &lt;A href="https://developers.home.google.com/automations/schema/reference/entity/sht_device/app_selector_state" target="_self"&gt;docs&lt;/A&gt; are not clear to me on how to expect it to work.&lt;/P&gt;&lt;P&gt;The values in this script have been filled in through the auto-complete. When i run the script from the editor it works.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expected:&lt;/STRONG&gt; When opening the appselector specified application on the associated device, the actions will fire.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actual:&lt;/STRONG&gt; Nothing happens when selecting the application on the device.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp; If i use `device.state.OnOff` with the same device as the starter, the action does fire.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #

metadata:
  name: Youtube TV Light # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
  description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”

automations:
  # “starters” and “actions” are required; “conditions” are optional.
  # Use Ctrl + Space to see autocomplete suggestions.

  # ---- STARTERS ---- #
  # Starters describe events that will start the automation.
  # To add more than one starter, duplicate the "- type" section under "starters".
  # If you add multiple starter events, any one of them happening will start the automation
  starters:
    - type: device.state.AppSelector # This function is used for devices which are able to switch inputs. # Enables querying devices that can support complex lighting commands to change state, such as looping through various colors.
      state: currentApplication
      is: YouTube TV # Enables querying devices which are able to switch inputs.
      device: Kitchen TV - Kitchen
  # starters:
  #   - type: device.state.OnOff # This function is used for devices which are able to switch inputs.
  #     state: on
  #     is: true
  #     device: Kitchen TV - Kitchen

  # ---- ACTIONS ---- #
  # Actions will start when a starter event takes place and all conditions are met.
  # Actions will start in the order they appear in the script and with any delay specified.
  # To add more than one action, duplicate the "- type" section under "actions".
  actions:
    - type: device.command.BrightnessAbsolute # Adjust device absolute brightness.
      brightness: 10
      devices: Transamerica Pyramid - Dining Room
    - type: assistant.command.Broadcast
      message: watching youtube tv
      devices: Kitchen display - Kitchen&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2023 23:08:31 GMT</pubDate>
    <dc:creator>V0idmain</dc:creator>
    <dc:date>2023-07-15T23:08:31Z</dc:date>
    <item>
      <title>Script Editor: How does device.state.AppSelector work?</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/452175#M19942</link>
      <description>&lt;P&gt;It looks like AppSelector can be used as a starter (which i find kind of fascinating...) but it doesn't seem to do anything. The &lt;A href="https://developers.home.google.com/automations/schema/reference/entity/sht_device/app_selector_state" target="_self"&gt;docs&lt;/A&gt; are not clear to me on how to expect it to work.&lt;/P&gt;&lt;P&gt;The values in this script have been filled in through the auto-complete. When i run the script from the editor it works.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expected:&lt;/STRONG&gt; When opening the appselector specified application on the associated device, the actions will fire.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actual:&lt;/STRONG&gt; Nothing happens when selecting the application on the device.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp; If i use `device.state.OnOff` with the same device as the starter, the action does fire.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #

metadata:
  name: Youtube TV Light # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
  description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”

automations:
  # “starters” and “actions” are required; “conditions” are optional.
  # Use Ctrl + Space to see autocomplete suggestions.

  # ---- STARTERS ---- #
  # Starters describe events that will start the automation.
  # To add more than one starter, duplicate the "- type" section under "starters".
  # If you add multiple starter events, any one of them happening will start the automation
  starters:
    - type: device.state.AppSelector # This function is used for devices which are able to switch inputs. # Enables querying devices that can support complex lighting commands to change state, such as looping through various colors.
      state: currentApplication
      is: YouTube TV # Enables querying devices which are able to switch inputs.
      device: Kitchen TV - Kitchen
  # starters:
  #   - type: device.state.OnOff # This function is used for devices which are able to switch inputs.
  #     state: on
  #     is: true
  #     device: Kitchen TV - Kitchen

  # ---- ACTIONS ---- #
  # Actions will start when a starter event takes place and all conditions are met.
  # Actions will start in the order they appear in the script and with any delay specified.
  # To add more than one action, duplicate the "- type" section under "actions".
  actions:
    - type: device.command.BrightnessAbsolute # Adjust device absolute brightness.
      brightness: 10
      devices: Transamerica Pyramid - Dining Room
    - type: assistant.command.Broadcast
      message: watching youtube tv
      devices: Kitchen display - Kitchen&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 23:08:31 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/452175#M19942</guid>
      <dc:creator>V0idmain</dc:creator>
      <dc:date>2023-07-15T23:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script Editor: How does device.state.AppSelector work?</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/455512#M20142</link>
      <description>&lt;P&gt;It doesn't seems to work for me as well.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 22:45:21 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/455512#M20142</guid>
      <dc:creator>Yehonatan</dc:creator>
      <dc:date>2023-07-20T22:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script Editor: How does device.state.AppSelector work?</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/475344#M21632</link>
      <description>&lt;P&gt;&lt;SPAN&gt;An App Selector is like a virtual gateway that lets you choose and switch between different applications (apps) on your device. Think of it as a tool that helps you navigate through the various programs or tools available on your smartphone, tablet, or computer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Read the complete guide about &lt;A title="Appselector" href="https://www.techradarto.com/what-is-appselector/" target="_self"&gt;what is Appselector and How does it work&lt;/A&gt;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 08:22:11 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/475344#M21632</guid>
      <dc:creator>typolike</dc:creator>
      <dc:date>2023-08-31T08:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script Editor: How does device.state.AppSelector work?</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/475397#M21641</link>
      <description>&lt;P&gt;Thanks for jumping in. But I'm pretty sure your reference here is not relevant.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:06:55 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/475397#M21641</guid>
      <dc:creator>V0idmain</dc:creator>
      <dc:date>2023-08-31T14:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script Editor: How does device.state.AppSelector work?</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/670703#M51005</link>
      <description>&lt;P&gt;It also doesn't work as a condition. It never resolves to true. Any update Google?&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2025 03:09:52 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-How-does-device-state-AppSelector-work/m-p/670703#M51005</guid>
      <dc:creator>joshuaking</dc:creator>
      <dc:date>2025-01-19T03:09:52Z</dc:date>
    </item>
  </channel>
</rss>

