def test_command(self): cmd = InsteonCommand(b'\x00\x00\x00', b'\x00\x00\x00', False, False, False, False, 0, 0, b'\x00', b'\x00', b'') encd = cmd.encode() self.assertEquals(encd, b'\x00\x00\x00\x00\x00\x00\x00\x00\x00') decd = InsteonCommand.decode(encd) self.assertFalse(decd.ack)
def __init__( self, to_address, broadcast, group, ack, extended, cur_hops, max_hops, cmd1, cmd2, extended_data, okay=None ): InsteonCommand.__init__( self, b"\x02\x62", to_address, broadcast, group, ack, extended, cur_hops, max_hops, cmd1, cmd2, extended_data, ) self.okay = okay