<?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 Re: Automation that ends if the sun sets after 18:30 in Home Automation</title>
    <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572234#M41036</link>
    <description>&lt;P&gt;If I understand what you're asking, what about something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata:
  name: Coming home lighting
  description: Turn on 2 lights when someone arrives home after sunset but before 18:30
automations:
  - starters:
      type: home.state.HomePresence
      state: homePresenceMode
      is: HOME
    condition:
      type: time.between
      before: 18:30
      after: sunset
    actions:
      type: device.command.OnOff
      on: true
      devices:
        - Light 1 - Home
        - Light 2 - Home&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 17:27:56 GMT</pubDate>
    <dc:creator>jwl_</dc:creator>
    <dc:date>2024-01-04T17:27:56Z</dc:date>
    <item>
      <title>Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/571779#M40948</link>
      <description>&lt;P&gt;Is it possible to make an comming home automation script that turn on all 2 lights when the sun is set. But by 18:30 at night the automation should not run. Because the sun sets after 18:30 i the summer time and before in the winter I can´t figured out how this should be made?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 19:09:09 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/571779#M40948</guid>
      <dc:creator>Joakim_Lind</dc:creator>
      <dc:date>2024-01-03T19:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572032#M40976</link>
      <description>&lt;P&gt;Script Editor FTW , along with a very similar script to what you want to do. If this doesn't make sense just let me know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;A href="https://developers.home.google.com/automations/example-scripts#scheduled_lighting_with_multiple_times" target="_blank" rel="noopener"&gt;https://developers.home.google.com/automations/example-scripts#scheduled_lighting_with_multiple_times&lt;/A&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;metadata:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;name: &lt;/SPAN&gt;&lt;SPAN class=""&gt;Scheduled lighting&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;description: &lt;/SPAN&gt;&lt;SPAN class=""&gt;Turn on the lights at sunset, dim them at 10pm and turn them off at midnight.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;automations:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;# At sunset&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;starters:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;type: &lt;/SPAN&gt;&lt;SPAN class=""&gt;time.schedule&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;at: &lt;/SPAN&gt;&lt;SPAN class=""&gt;SUNSET&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;actions:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;# Adjusting brightness will automatically turn on the lights.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;# No need to add a separate OnOff command.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;type: &lt;/SPAN&gt;&lt;SPAN class=""&gt;device.command.BrightnessAbsolute&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;devices:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt; Christmas lights &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt; Living Room&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;brightness: &lt;/SPAN&gt;&lt;SPAN class=""&gt;100&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;# At 10 PM&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;starters:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;type: &lt;/SPAN&gt;&lt;SPAN class=""&gt;time.schedule&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;at: &lt;/SPAN&gt;&lt;SPAN class=""&gt;22&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN class=""&gt;00&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;actions:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;type: &lt;/SPAN&gt;&lt;SPAN class=""&gt;device.command.BrightnessAbsolute&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;devices:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt; Christmas lights &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt; Living Room&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;brightness: &lt;/SPAN&gt;&lt;SPAN class=""&gt;50&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;# At midnight&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;starters:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;type: &lt;/SPAN&gt;&lt;SPAN class=""&gt;time.schedule&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;at: &lt;/SPAN&gt;&lt;SPAN class=""&gt;00&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN class=""&gt;00&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;actions:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;type: &lt;/SPAN&gt;&lt;SPAN class=""&gt;device.command.OnOff&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;devices: &lt;/SPAN&gt;&lt;SPAN class=""&gt;Christmas lights &lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt; Living Room&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;on: &lt;/SPAN&gt;&lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 08:11:46 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572032#M40976</guid>
      <dc:creator>OpethNJ</dc:creator>
      <dc:date>2024-01-04T08:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572234#M41036</link>
      <description>&lt;P&gt;If I understand what you're asking, what about something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata:
  name: Coming home lighting
  description: Turn on 2 lights when someone arrives home after sunset but before 18:30
automations:
  - starters:
      type: home.state.HomePresence
      state: homePresenceMode
      is: HOME
    condition:
      type: time.between
      before: 18:30
      after: sunset
    actions:
      type: device.command.OnOff
      on: true
      devices:
        - Light 1 - Home
        - Light 2 - Home&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 17:27:56 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572234#M41036</guid>
      <dc:creator>jwl_</dc:creator>
      <dc:date>2024-01-04T17:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572556#M41107</link>
      <description>&lt;P&gt;Yes, that would work if the sun did´nt set after 18:30 in the summer time. So it will turn on the light after 18:30 in the summer time.&lt;/P&gt;&lt;P&gt;It would work if it was possable to add a second condition between sunset and sunrise.&lt;/P&gt;&lt;P&gt;Is it possable to do that?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 12:57:52 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572556#M41107</guid>
      <dc:creator>Joakim_Lind</dc:creator>
      <dc:date>2024-01-05T12:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572560#M41109</link>
      <description>&lt;P&gt;No, this does not make sense to my question.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 13:00:09 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572560#M41109</guid>
      <dc:creator>Joakim_Lind</dc:creator>
      <dc:date>2024-01-05T13:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572566#M41111</link>
      <description>&lt;P&gt;Just a thought for future, if you have something with a lux sensor, you can create the automation to turn on the lights is the level is too low.&amp;nbsp; This works irrespective of time of day like if it is really stormy.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 13:39:50 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572566#M41111</guid>
      <dc:creator>ViciousNarwhal</dc:creator>
      <dc:date>2024-01-05T13:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572631#M41119</link>
      <description>&lt;P&gt;In that case, you can try to do an "AND" conditional with another set of times to make sure it falls between a standard range.&amp;nbsp; Maybe something like this where you can change the second time conditions to fit your needs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata:
  name: Coming home lighting
  description: Turn on 2 lights when someone arrives home after sunset but before 18:30
automations:
  - starters:
      type: home.state.HomePresence
      state: homePresenceMode
      is: HOME
    condition:
      type: and
      # "AND" together two or more conditionals
      conditions:
        - type: time.between
          before: 18:30
          after: sunset
        - type: time.between
          before: 18:30
          after: 15:00
    actions:
      type: device.command.OnOff
      on: true
      devices:
        - Light 1 - Home
        - Light 2 - Home&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 17:19:17 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/572631#M41119</guid>
      <dc:creator>jwl_</dc:creator>
      <dc:date>2024-01-05T17:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/573760#M41412</link>
      <description>&lt;P&gt;That was exactly what I tried to do but I got an error when I had 2 conditions. But now when I tried this again there was no errors. So this made the trick.&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 12:58:37 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/573760#M41412</guid>
      <dc:creator>Joakim_Lind</dc:creator>
      <dc:date>2024-01-08T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automation that ends if the sun sets after 18:30</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/627801#M47053</link>
      <description>&lt;P&gt;So yesterday when we got home the lights turned on when the sun was still upp. I have not made any changes and another routine with only sunset to sunrise and no "AND" command still works.&lt;/P&gt;&lt;P&gt;My goal is to turn the lights on after sunset but not if the time is 18:30 or later.&lt;/P&gt;&lt;P&gt;# ------------------------------------------------------------------------------------------ #&lt;BR /&gt;# Lines starting with “#” are comments and will be ignored by the automation.&lt;BR /&gt;# Indentation determines hierarchy within the script.&lt;BR /&gt;# Visit g.co/home/script-editor-docs for full documentation.&lt;BR /&gt;# ------------------------------------------------------------------------------------------ #&lt;/P&gt;&lt;P&gt;metadata:&lt;BR /&gt;name: Tänd sovrum vid hemkost # Choose a short name that summarizes important starters and actions, like “Sunset lights”.&lt;BR /&gt;description: Tänd sovrummen vid hemkost senast 18:30 # 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.”&lt;/P&gt;&lt;P&gt;automations:&lt;BR /&gt;# “starters” and “actions” are required; “conditions” are optional.&lt;BR /&gt;# Use Ctrl + Space to see autocomplete suggestions.&lt;/P&gt;&lt;P&gt;# ---- STARTERS ---- #&lt;BR /&gt;# Starters describe events that will start the automation.&lt;BR /&gt;# To add more than one starter, duplicate the "- type" section under "starters".&lt;BR /&gt;# If you add multiple starter events, any one of them happening will start the automation.&lt;BR /&gt;starters:&lt;BR /&gt;- type: home.state.HomePresence&lt;BR /&gt;state: homePresenceMode&lt;BR /&gt;# [available operators: is, isNot]&lt;BR /&gt;is: HOME&lt;/P&gt;&lt;P&gt;# ---- CONDITIONS ---- #&lt;BR /&gt;# Conditions are optional. Delete this section if it’s empty.&lt;BR /&gt;# Conditions will prevent an automation from starting if the conditions aren’t met.&lt;BR /&gt;# See g.co/home/script-editor-docs for documentation about how to use logical operators like “and”, “or”, and “not”.&lt;BR /&gt;condition:&lt;BR /&gt;type: and&lt;BR /&gt;# "AND" together two or more conditionals&lt;BR /&gt;conditions:&lt;BR /&gt;- type: time.between&lt;BR /&gt;# Optional. Accepts either clock time (10:00:00 AM, with seconds optional, or in a 24 hour format), or 'sunrise' or 'sunset', with an optional offset ('sunrise+10m', for instance)&lt;BR /&gt;before: sunrise&lt;BR /&gt;# Optional. Accepts either clock time (10:00:00 AM, with seconds optional, or in a 24 hour format), or 'sunrise' or 'sunset', with an optional offset ('sunrise+10m', for instance)&lt;BR /&gt;after: sunset&lt;BR /&gt;# Optional. Days of the week to apply condition on.&lt;BR /&gt;weekdays:&lt;BR /&gt;- MON&lt;BR /&gt;- TUE&lt;BR /&gt;- WED&lt;BR /&gt;- THU&lt;BR /&gt;- FRI&lt;BR /&gt;- SAT&lt;BR /&gt;- SUN&lt;BR /&gt;- type: time.between&lt;BR /&gt;# Optional. Accepts either clock time (10:00:00 AM, with seconds optional, or in a 24 hour format), or 'sunrise' or 'sunset', with an optional offset ('sunrise+10m', for instance)&lt;BR /&gt;before: 18:30&lt;BR /&gt;# Optional. Accepts either clock time (10:00:00 AM, with seconds optional, or in a 24 hour format), or 'sunrise' or 'sunset', with an optional offset ('sunrise+10m', for instance)&lt;BR /&gt;after: sunrise&lt;BR /&gt;# Optional. Days of the week to apply condition on.&lt;BR /&gt;weekdays:&lt;BR /&gt;- MON&lt;BR /&gt;- TUE&lt;BR /&gt;- WED&lt;BR /&gt;- THU&lt;BR /&gt;- FRI&lt;BR /&gt;- SAT&lt;BR /&gt;- SUN&lt;/P&gt;&lt;P&gt;# ---- ACTIONS ---- #&lt;BR /&gt;# Actions will start when a starter event takes place and all conditions are met.&lt;BR /&gt;# Actions will start in the order they appear in the script and with any delay specified.&lt;BR /&gt;# To add more than one action, duplicate the "- type" section under "actions".&lt;BR /&gt;actions:&lt;BR /&gt;- type: device.command.OnOff # Turn the device on or off.&lt;BR /&gt;# Whether to turn the device on or off.&lt;BR /&gt;on: true&lt;BR /&gt;devices:&lt;BR /&gt;- Ellas fönsterlampa - Ellas rum&lt;BR /&gt;- Sovrumsfönstret - Sovrum&lt;BR /&gt;- Edvins fönsterlampa - Edvins rum&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 16:33:10 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automation-that-ends-if-the-sun-sets-after-18-30/m-p/627801#M47053</guid>
      <dc:creator>Joakim_Lind</dc:creator>
      <dc:date>2024-06-24T16:33:10Z</dc:date>
    </item>
  </channel>
</rss>

