<?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 scrips newbie issue (aqara door sensor X yeelight) in Home Automation</title>
    <link>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/451966#M19924</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;just take a look a try to tell me whats wrong. And maybe try write me a funcional script.&lt;/P&gt;&lt;P&gt;I just wanna turn on three hallway light (H1-H3) when I open door on wardrobe, when close turn off.&lt;/P&gt;&lt;P&gt;What is a genuine identification of device - is enough to rename the device in google home or I need to change name in native/original app?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc1_2.JPG" style="width: 999px;"&gt;&lt;img src="https://www.googlenestcommunity.com/t5/image/serverpage/image-id/26947i26D63BE32CCC9D0A/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="sc1_2.JPG" alt="sc1_2.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc1.JPG" style="width: 999px;"&gt;&lt;img src="https://www.googlenestcommunity.com/t5/image/serverpage/image-id/26948iFBB50738B93EB803/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="sc1.JPG" alt="sc1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2023 17:06:01 GMT</pubDate>
    <dc:creator>bellete</dc:creator>
    <dc:date>2023-07-15T17:06:01Z</dc:date>
    <item>
      <title>scrips newbie issue (aqara door sensor X yeelight)</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/451966#M19924</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;just take a look a try to tell me whats wrong. And maybe try write me a funcional script.&lt;/P&gt;&lt;P&gt;I just wanna turn on three hallway light (H1-H3) when I open door on wardrobe, when close turn off.&lt;/P&gt;&lt;P&gt;What is a genuine identification of device - is enough to rename the device in google home or I need to change name in native/original app?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc1_2.JPG" style="width: 999px;"&gt;&lt;img src="https://www.googlenestcommunity.com/t5/image/serverpage/image-id/26947i26D63BE32CCC9D0A/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="sc1_2.JPG" alt="sc1_2.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc1.JPG" style="width: 999px;"&gt;&lt;img src="https://www.googlenestcommunity.com/t5/image/serverpage/image-id/26948iFBB50738B93EB803/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="sc1.JPG" alt="sc1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 17:06:01 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/451966#M19924</guid>
      <dc:creator>bellete</dc:creator>
      <dc:date>2023-07-15T17:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: scrips newbie issue (aqara door sensor X yeelight)</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/452618#M19976</link>
      <description>&lt;P&gt;Wardrobe open, lights on automation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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: Wardrobe open, lights on
  description: IF the wardrobe (WS1) door contact sensor is opened, THEN the hallway lights (H1-H3) will be turned on

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.OpenClose
      state: openPercent
      is: 100
      device: WS1 - Hallway

  # ---- 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.OnOff # Turn the device on or off.
      on: true
      devices: 
      - H1 - Hallway
      - H2 - Hallway
      - H3 - Hallway&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wardrobe closed, lights off automation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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: Wardrobe closed, lights off
  description: IF the wardrobe (WS1) door contact sensor is closed, THEN the hallway lights (H1-H3) will be turned off

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.OpenClose
      state: openPercent
      is: 0
      device: WS1 - Hallway

  # ---- 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.OnOff # Turn the device on or off.
      on: false
      devices: 
      - H1 - Hallway
      - H2 - Hallway
      - H3 - Hallway&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 17 Jul 2023 19:30:50 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/452618#M19976</guid>
      <dc:creator>DWB1973</dc:creator>
      <dc:date>2023-07-17T19:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: scrips newbie issue (aqara door sensor X yeelight)</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/453715#M20029</link>
      <description>&lt;P&gt;Yeah, thank you dear friend! Its workin...but, I noticed that sensor in google home gives percentage. 1% when open (I did no see any diffrent value) and 0% when close.&lt;/P&gt;&lt;P&gt;It is possible to set range 1-100 for open an turn lights on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 09:13:17 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/453715#M20029</guid>
      <dc:creator>bellete</dc:creator>
      <dc:date>2023-07-18T09:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: scrips newbie issue (aqara door sensor X yeelight)</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/453879#M20039</link>
      <description>&lt;P&gt;You're welcome.&lt;/P&gt;&lt;P&gt;According to Google Home's OpenClose Trait Schema, contact sensors (closet) are in the same category as window treatments (curtain);&amp;nbsp; simple,&amp;nbsp;single direction open-close devices.&amp;nbsp; Script editor will only allow the 'openPercent' key to be used for contact sensors, and the Google Home app reports the sensor's open/close state in percentages - for simple,&amp;nbsp;single direction open-close devices, anything above 1% is equal to the open state.&lt;/P&gt;&lt;P&gt;References:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OpenClose Trait Schema&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.home.google.com/cloud-to-cloud/traits/openclose#single-direction-open-close" target="_blank"&gt;https://developers.home.google.com/cloud-to-cloud/traits/openclose#single-direction-open-close&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Smart Home Closet Guide&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.home.google.com/cloud-to-cloud/guides/closet" target="_blank"&gt;https://developers.home.google.com/cloud-to-cloud/guides/closet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If the automation is running as you intended, then nothing needs to be changed.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 15:38:31 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/scrips-newbie-issue-aqara-door-sensor-X-yeelight/m-p/453879#M20039</guid>
      <dc:creator>DWB1973</dc:creator>
      <dc:date>2023-07-18T15:38:31Z</dc:date>
    </item>
  </channel>
</rss>

