dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: May 25 2009 at 11:41 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
This formula will return the current valve status as a value from 0 to 8.  A value of 0 means off with 1 thru 8 (0 - 7) representing the current valve that is on.
 
 
Code: 
   
    
    
      
       | ph_setvar_a(1,1,ph_insteonwithret("EZRAIN ID",68,2)) + if(ph_and(ph_getvar_n(1,1),128) = 128,ph_and(ph_getvar_n(1,1),7) + 1,0) | 
       
       | 
    
    | 
 
 
 
 Be sure and replace the "EZRAN ID" with the ID of your EZRAIN device.
 
 HTH,
 
 Dave.
 
  Edited by dhoward - May 25 2009 at 11:42
         |