<?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: Exclude Device from Routine Actions if it is Turned Off in Home Automation</title>
    <link>https://www.googlenestcommunity.com/t5/Home-Automation/Exclude-Device-from-Routine-Actions-if-it-is-Turned-Off/m-p/480058#M22037</link>
    <description>&lt;P&gt;I think I may have figured out a solution to this in a different thread.&lt;/P&gt;&lt;P&gt;The link for that is here:&amp;nbsp;&lt;A href="https://www.googlenestcommunity.com/t5/Home-Automation/Starter-gt-condition1-gt-action1-gt-condition2-gt-action2/m-p/480057/highlight/true#M22036" target="_blank" rel="noopener"&gt;https://www.googlenestcommunity.com/t5/Home-Automation/Starter-gt-condition1-gt-action1-gt-condition2-gt-action2/m-p/480057/highlight/true#M22036&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-----EDIT: MORE INFORMATION BELOW-----&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I wanted to edit this reply to say that I found out some other ways to achieve what I was looking for. The key points are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Many starters have an optional "for" field which lets you set how long the starter trigger needs to be active for before it kicks off any automation.&lt;UL&gt;&lt;LI&gt;My TV has to be on for an hour and a half BEFORE it checks conditions and runs actions.&lt;/LI&gt;&lt;LI&gt;time.delay in actions is great for some things but that seems to pause the WHOLE automation if a time.delay is active.&lt;/LI&gt;&lt;LI&gt;Using "for" appears to not pause the rest of the automation so this will allow other actions to take place.&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;For example:&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;# ---- TV STARTERS ---- #
  # ---- TV SLEEP TIMER ---- #
  - name: TV Sleep Timer
    starters:
      - type: device.state.OnOff
        state: on
        is: true
        device: Master bedroom Roku - Master Bedroom
        for: 1 hour 30 min&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you are looking for a workaround way to have a sort of device state variable that is more native to Google (rather than using HomeAssistant, SmartThings, etc) there is a Google Home Playground that will let you set up some virtual/dummy devices that you can add to your home and perform actions on.&lt;UL&gt;&lt;LI&gt;This means you could set up a simple light and use it as a true/false variable.&lt;/LI&gt;&lt;LI&gt;And example idea:&lt;UL&gt;&lt;LI&gt;Say you don't want your routine to trigger again if you manually stop it but your starter might trigger it again for some reason.&lt;/LI&gt;&lt;LI&gt;You could have a condition set so that if the virtual light is on then the routine will continue to run.&lt;/LI&gt;&lt;LI&gt;In your actions the first thing you could do is turn the virtual light off and then do your wanted actions.&lt;/LI&gt;&lt;LI&gt;And thusly, if you stop the routine and something triggers again and you don't want it to run then the condition would fail and it wouldn't run.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I found out about this option in the following comment that links to instructions on how to get started with the Google Home Playground.&lt;UL&gt;&lt;LI&gt;Comment:&amp;nbsp;&lt;A href="https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-Share-your-ideas-and-vote-on-others-ideas/m-p/452846/highlight/true#M19989" target="_blank" rel="noopener"&gt;https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-Share-your-ideas-and-vote-on-others-ideas/m-p/452846/highlight/true#M19989&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I have done much with this knowledge just yet, but I have some ideas rolling around.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope all this information helps some of you out! Please let me know if you have any questions, I'm happy to help if I can.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 17:50:37 GMT</pubDate>
    <dc:creator>linkian19</dc:creator>
    <dc:date>2023-09-14T17:50:37Z</dc:date>
    <item>
      <title>Exclude Device from Routine Actions if it is Turned Off</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Exclude-Device-from-Routine-Actions-if-it-is-Turned-Off/m-p/480017#M22028</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;I've been playing around with the new automation script editor and it's been a fun time!&lt;/P&gt;&lt;P&gt;I've recently set up an automation that when I arm my security system it turns off various devices, turns on our bedroom TV and our nightstand lamps.&lt;/P&gt;&lt;P&gt;When the bedroom TV turns on that kicks off another routine that is intended to be a "wind-down". It will wait for 5 minutes, then turn the lamps to 25% brightness, another 5 and to 10% brightness, another 5 and to 1%, and then finally after another 5 minutes it turns the lamps off. Then after about an hour the TV turns off.&lt;/P&gt;&lt;P&gt;This all works except for one case I've discovered: If I turn off one of the lamps before the routine turns it off, when it runs the next brightness command, it turns the lamp back on.&lt;/P&gt;&lt;P&gt;This is not my intended behavior. Ideally I would like the lamp to stay off if we manually turn it off. This could happen because maybe I want my lamp off or my wife's lamp is bothering her (or whatever reason). Is there anyway to check device state during actions (almost like a nested condition in an action?) so that it's essentially an if statement? Basically: if lamp off, don't run the brightness action&lt;/P&gt;&lt;P&gt;I am using the BrightnessAbsolute command, would BrightnessRelative be the better option? I wasn't sure what the difference was since the documentation pages for those commands don't really sate the difference between them.&lt;/P&gt;&lt;P&gt;Any help would be appreciated, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 17:48:37 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Exclude-Device-from-Routine-Actions-if-it-is-Turned-Off/m-p/480017#M22028</guid>
      <dc:creator>linkian19</dc:creator>
      <dc:date>2023-09-12T17:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Device from Routine Actions if it is Turned Off</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Exclude-Device-from-Routine-Actions-if-it-is-Turned-Off/m-p/480058#M22037</link>
      <description>&lt;P&gt;I think I may have figured out a solution to this in a different thread.&lt;/P&gt;&lt;P&gt;The link for that is here:&amp;nbsp;&lt;A href="https://www.googlenestcommunity.com/t5/Home-Automation/Starter-gt-condition1-gt-action1-gt-condition2-gt-action2/m-p/480057/highlight/true#M22036" target="_blank" rel="noopener"&gt;https://www.googlenestcommunity.com/t5/Home-Automation/Starter-gt-condition1-gt-action1-gt-condition2-gt-action2/m-p/480057/highlight/true#M22036&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-----EDIT: MORE INFORMATION BELOW-----&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I wanted to edit this reply to say that I found out some other ways to achieve what I was looking for. The key points are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Many starters have an optional "for" field which lets you set how long the starter trigger needs to be active for before it kicks off any automation.&lt;UL&gt;&lt;LI&gt;My TV has to be on for an hour and a half BEFORE it checks conditions and runs actions.&lt;/LI&gt;&lt;LI&gt;time.delay in actions is great for some things but that seems to pause the WHOLE automation if a time.delay is active.&lt;/LI&gt;&lt;LI&gt;Using "for" appears to not pause the rest of the automation so this will allow other actions to take place.&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;For example:&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;# ---- TV STARTERS ---- #
  # ---- TV SLEEP TIMER ---- #
  - name: TV Sleep Timer
    starters:
      - type: device.state.OnOff
        state: on
        is: true
        device: Master bedroom Roku - Master Bedroom
        for: 1 hour 30 min&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you are looking for a workaround way to have a sort of device state variable that is more native to Google (rather than using HomeAssistant, SmartThings, etc) there is a Google Home Playground that will let you set up some virtual/dummy devices that you can add to your home and perform actions on.&lt;UL&gt;&lt;LI&gt;This means you could set up a simple light and use it as a true/false variable.&lt;/LI&gt;&lt;LI&gt;And example idea:&lt;UL&gt;&lt;LI&gt;Say you don't want your routine to trigger again if you manually stop it but your starter might trigger it again for some reason.&lt;/LI&gt;&lt;LI&gt;You could have a condition set so that if the virtual light is on then the routine will continue to run.&lt;/LI&gt;&lt;LI&gt;In your actions the first thing you could do is turn the virtual light off and then do your wanted actions.&lt;/LI&gt;&lt;LI&gt;And thusly, if you stop the routine and something triggers again and you don't want it to run then the condition would fail and it wouldn't run.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I found out about this option in the following comment that links to instructions on how to get started with the Google Home Playground.&lt;UL&gt;&lt;LI&gt;Comment:&amp;nbsp;&lt;A href="https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-Share-your-ideas-and-vote-on-others-ideas/m-p/452846/highlight/true#M19989" target="_blank" rel="noopener"&gt;https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-Share-your-ideas-and-vote-on-others-ideas/m-p/452846/highlight/true#M19989&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I have done much with this knowledge just yet, but I have some ideas rolling around.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope all this information helps some of you out! Please let me know if you have any questions, I'm happy to help if I can.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 17:50:37 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Exclude-Device-from-Routine-Actions-if-it-is-Turned-Off/m-p/480058#M22037</guid>
      <dc:creator>linkian19</dc:creator>
      <dc:date>2023-09-14T17:50:37Z</dc:date>
    </item>
  </channel>
</rss>

