insert into macroheader values ('GET LIGHT STATUS','POLL FOR ALL LIGHT STATUS',0,0,1); insert into macrodetail values ('GET LIGHT STATUS',1,10,'LIGHT STATUS',NULL,'if(ph_getinsteonstat("DINNING ROOM LIGHT") > 1,"On",if(ph_getinsteonstat("BACK PORCH LIGHT 2") > 1,"On",if(ph_getinsteonstat("GARAGE LIGHT") > 1,"On",if(ph_getinsteonstat("GUEST BEDROOM") > 1,"On",if(ph_getinsteonstat("KITCHEN KEYPADLINC") > 1,"On",if(ph_getinsteonstat("KITCHEN LIGHT") > 1,"On",if(ph_getinsteonstat("LAUNDRY ROOM LIGHT MASTER") > 1,"On",if(ph_getinsteonstat("MASTER BEDROOM FAN LIGHTS") > 1,"On",if(ph_getinsteonstat("MASTER BEDROOM KEYPAD") > 1,"On",if(ph_getinsteonstat("LIVING ROOM LIGHTS") > 1,"On",if(ph_getinsteonstat("HALLWAY LIGHT") > 1,"On",if(ph_getinsteonstat("FRONT PORCH LIGHT") > 1,"On",if(ph_getinsteonstat("GUEST BATHROOM LIGHT") > 1,"On",if(ph_getinsteonstat("COMPUTER ROOM LIGHT") > 1,"On",if(ph_getinsteonstat("CLOSET LIGHT") > 1,"On",if(ph_getinsteonstat("DINNING ROOM LIGHT") > 1,"On","Off"))))))))))))))))',0,'');