<?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 Automations… if xxx else yyyy in Home Automation</title>
    <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/596038#M44641</link>
    <description>&lt;P&gt;Hi, Basically I’m after a google home automation script that turns lights on (if they are off) and off (if they are on).&lt;/P&gt;&lt;P&gt;When I run the following script it turns the lights on, then off &lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;, and&amp;nbsp;&lt;/SPAN&gt;on other occasions it seems to do 2 or 3 actions… eg on off on, off on, etc. I assume it’s doing the following starters and actions sequentially&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ps the reason for this request is to minimise the growing number of automations I have, an if then else command would half the number of automations needed and simplify favourites and automations tabs on google home&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jim&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;metadata:&lt;BR /&gt;name: test lights&lt;BR /&gt;description: toggle lights, if off turn on, if on turn off&lt;BR /&gt;automations:&lt;BR /&gt;# if off turn on&lt;BR /&gt;- starters:&lt;BR /&gt;- type: device.state.OnOff&lt;BR /&gt;device: pendant lights - Kitchen&lt;BR /&gt;state: on&lt;BR /&gt;is: false&lt;BR /&gt;actions:&lt;BR /&gt;- type: device.command.OnOff&lt;BR /&gt;devices: pendant lights - Kitchen&lt;BR /&gt;on: true&lt;BR /&gt;# if on turn off&lt;BR /&gt;- starters:&lt;BR /&gt;- type: device.state.OnOff&lt;BR /&gt;device: pendant lights - Kitchen&lt;BR /&gt;state: on&lt;BR /&gt;is: true&lt;BR /&gt;actions:&lt;BR /&gt;- type: device.command.OnOff&lt;BR /&gt;devices: pendant lights - Kitchen&lt;BR /&gt;on: false&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 00:43:51 GMT</pubDate>
    <dc:creator>jh9</dc:creator>
    <dc:date>2024-02-14T00:43:51Z</dc:date>
    <item>
      <title>Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/596038#M44641</link>
      <description>&lt;P&gt;Hi, Basically I’m after a google home automation script that turns lights on (if they are off) and off (if they are on).&lt;/P&gt;&lt;P&gt;When I run the following script it turns the lights on, then off &lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;, and&amp;nbsp;&lt;/SPAN&gt;on other occasions it seems to do 2 or 3 actions… eg on off on, off on, etc. I assume it’s doing the following starters and actions sequentially&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ps the reason for this request is to minimise the growing number of automations I have, an if then else command would half the number of automations needed and simplify favourites and automations tabs on google home&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jim&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;metadata:&lt;BR /&gt;name: test lights&lt;BR /&gt;description: toggle lights, if off turn on, if on turn off&lt;BR /&gt;automations:&lt;BR /&gt;# if off turn on&lt;BR /&gt;- starters:&lt;BR /&gt;- type: device.state.OnOff&lt;BR /&gt;device: pendant lights - Kitchen&lt;BR /&gt;state: on&lt;BR /&gt;is: false&lt;BR /&gt;actions:&lt;BR /&gt;- type: device.command.OnOff&lt;BR /&gt;devices: pendant lights - Kitchen&lt;BR /&gt;on: true&lt;BR /&gt;# if on turn off&lt;BR /&gt;- starters:&lt;BR /&gt;- type: device.state.OnOff&lt;BR /&gt;device: pendant lights - Kitchen&lt;BR /&gt;state: on&lt;BR /&gt;is: true&lt;BR /&gt;actions:&lt;BR /&gt;- type: device.command.OnOff&lt;BR /&gt;devices: pendant lights - Kitchen&lt;BR /&gt;on: false&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 00:43:51 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/596038#M44641</guid>
      <dc:creator>jh9</dc:creator>
      <dc:date>2024-02-14T00:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/601424#M45047</link>
      <description>&lt;P&gt;First glance you would want a condition for each that separates so they dont randomly trigger each other.&amp;nbsp; Could also probably do it with FOR or supressFOR in your starter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 01:45:23 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/601424#M45047</guid>
      <dc:creator>OpethNJ</dc:creator>
      <dc:date>2024-02-29T01:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/602424#M45103</link>
      <description>&lt;P&gt;hi, thanks for the info (i'm just back from hols), i'll google FOR and see what it can do&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2024 22:26:57 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/602424#M45103</guid>
      <dc:creator>jh9</dc:creator>
      <dc:date>2024-03-03T22:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/603117#M45154</link>
      <description>&lt;P&gt;I couldn’t find anything to help, I also looked at conditions&lt;/P&gt;&lt;P&gt;i guess “if then else” is not supported which seems rather odd as it’s a basic element of all programming languages I’ve used for the last 50 years…&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 22:56:45 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/603117#M45154</guid>
      <dc:creator>jh9</dc:creator>
      <dc:date>2024-03-05T22:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/624041#M46813</link>
      <description>&lt;P&gt;#&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jun 2024 13:39:45 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/624041#M46813</guid>
      <dc:creator>mraby6889</dc:creator>
      <dc:date>2024-06-02T13:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/624042#M46814</link>
      <description>&lt;P&gt;#&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jun 2024 13:42:26 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/624042#M46814</guid>
      <dc:creator>mraby6889</dc:creator>
      <dc:date>2024-06-02T13:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Automations… if xxx else yyyy</title>
      <link>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/624047#M46815</link>
      <description>&lt;P&gt;This was solved, &lt;A href="https://www.googlenestcommunity.com/t5/Home-Automation/If-else-clause-in-google-home-script/m-p/608812#M45766" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jun 2024 14:00:46 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Home-Automation/Automations-if-xxx-else-yyyy/m-p/624047#M46815</guid>
      <dc:creator>jh9</dc:creator>
      <dc:date>2024-06-02T14:00:46Z</dc:date>
    </item>
  </channel>
</rss>

