class WeMoTests(TestCase): def setUp(self): # self.interface = WeMo( '192.168.13.141', '49153') self.interface = WeMo(MockInterface()) def test_instantiation(self): self.assertIsInstance(self.interface, WeMo) def test_on(self): result = self.interface.on() self.assertEqual(result, None)
def setUp(self): # self.interface = WeMo( '192.168.13.141', '49153') self.interface = WeMo(MockInterface())
Attribute.COMMAND: (Command.MOTION, Command.LIGHT), Attribute.TARGET: Command.OFF, Attribute.SECS: 30 * 60 }, ignore={ Attribute.COMMAND: (Command.STILL, Command.DARK), }, ) l_bed_hallway = Light( address='19.0d.1b', devices=(insteon, ), name='Bed Hallway Light', ) l_playroom = Light(devices=WeMo('192.168.13.141', '49153'), name='Playroom') ##################### USER CODE ############################### #Manually controlling the light #l_foyer.on() #l_foyer.off() #l_front_porch.on() #l_front_porch.off() #l_family_lamp.l40() upb.update_status() def MainLoop(startup=False, *args, **kwargs): if startup: print 'Run once'