Okay, so I was trying to do this earlier, did a cheap workaround to solve it, but I can never not try to figure something out. So I'm at it again. All I am trying to do is check the status of my "Watch TV" activity on my Vera unit and have a particular action take place. If Vera.Get.Status shows that "Watch TV" is off (0), then turn it on. If Vera.Get.Status shows that "Watch TV" is on (1), then OSD.ShowText and TTS.Speak: "Your TV is already on."
I think I got it working for the most part, a little unsure though because whenever I save and execute the command for testing, it repeats the action over and over again. And even if Vera.Get.Status indicates my activity was off, it turns it on as it should but it also activates the second IF section of my command which is if "Watch TV" is on, then OSD.ShowText and TTS.Speak: "Your TV is already on."
So I'm wondering how do I get this to stop looping, which I'm thinking is causing it to also activate my second IF statement.
Here's my xml:
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<groupCollection open="True" name="Test Vera Status">
<commandGroup open="True" name="Test Vera Status" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="814" name="Test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Vera.Get.Status</cmdType>
<params>
<param>{M:Vera1D.Harmony Control}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)<(B)</ifType>
<ifParams>0&&1</ifParams>
<then>
<action>
<cmdType>Vera.Scene</cmdType>
<params>
<param>{M:Vera1S.Watch TV}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)Contains(B)</ifType>
<ifParams>{2}&&1</ifParams>
<then>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>your tv is already on</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>your tv is already on.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType />
<params />
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<event>Vera1.Scene.31.Active</event>
</command>
</commandGroup>
</groupCollection>